Skip to content

Commit

Permalink
feat: enable_caching in PipelineJob to compile time settings (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
ji-yaqi committed Jul 21, 2021
1 parent 6f8d3d1 commit c9da662
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions google/cloud/aiplatform/pipeline_jobs.py
Expand Up @@ -96,7 +96,7 @@ def __init__(
job_id: Optional[str] = None,
pipeline_root: Optional[str] = None,
parameter_values: Optional[Dict[str, Any]] = None,
enable_caching: Optional[bool] = True,
enable_caching: Optional[bool] = None,
encryption_spec_key_name: Optional[str] = None,
labels: Optional[Dict[str, str]] = None,
credentials: Optional[auth_credentials.Credentials] = None,
Expand All @@ -121,7 +121,15 @@ def __init__(
Optional. The mapping from runtime parameter names to its values that
control the pipeline run.
enable_caching (bool):
Optional. Whether to turn on caching for the run. Defaults to True.
Optional. Whether to turn on caching for the run.
If this is not set, defaults to the compile time settings, which
are True for all tasks by default, while users may specify
different caching options for individual tasks.
If this is set, the setting applies to all tasks in the pipeline.
Overrides the compile time settings.
encryption_spec_key_name (str):
Optional. The Cloud KMS resource identifier of the customer
managed encryption key used to protect the job. Has the
Expand Down Expand Up @@ -198,7 +206,8 @@ def __init__(
runtime_config = gca_pipeline_job_v1beta1.PipelineJob.RuntimeConfig()._pb
json_format.ParseDict(runtime_config_dict, runtime_config)

_set_enable_caching_value(pipeline_job["pipelineSpec"], enable_caching)
if enable_caching is not None:
_set_enable_caching_value(pipeline_job["pipelineSpec"], enable_caching)

self._gca_resource = gca_pipeline_job_v1beta1.PipelineJob(
display_name=display_name,
Expand Down

0 comments on commit c9da662

Please sign in to comment.