Skip to content

Commit

Permalink
resolve comments on docstring and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
zichuan-scott-xu committed Jul 11, 2022
1 parent f48a881 commit 2b30622
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
3 changes: 0 additions & 3 deletions sdk/python/kfp/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,6 @@ def _override_caching_options(self, pipeline_obj: dict,
Args:
pipeline_obj (dict): Dict object parsed from the yaml file.
enable_caching (bool): Overrides options, one of 'True', 'False'.
Returns:
None
"""
for _, task in pipeline_obj['root']['dag']['tasks'].items():
if 'cachingOptions' in task:
Expand Down
21 changes: 0 additions & 21 deletions sdk/python/kfp/client/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,8 @@ def test_invalid(self, name: str):
client.validate_pipeline_resource_name(name)


PIPELINES_TEST_DATA_DIR = os.path.join(
os.path.abspath(os.path.join(__file__, os.path.pardir, os.path.pardir)),
'compiler', 'test_data', 'pipelines')


class TestOverrideCachingOptions(parameterized.TestCase):

@parameterized.parameters([
'pipeline_with_importer',
'pipeline_with_after',
'pipeline_with_nested_conditions',
'pipeline_with_loops',
])
def test_override_caching_from_yaml(self, pipeline_base_name: str):
pipeline_path = os.path.join(PIPELINES_TEST_DATA_DIR,
f'{pipeline_base_name}.yaml')
with open(pipeline_path) as f:
yaml_dict = yaml.safe_load(f)
test_client = client.Client(namespace='dummy_namespace')
test_client._override_caching_options(yaml_dict, False)
for _, task in yaml_dict['root']['dag']['tasks'].items():
self.assertFalse(task['cachingOptions']['enableCache'])

def test_override_caching_from_pipeline(self):

@component
Expand Down

0 comments on commit 2b30622

Please sign in to comment.