@@ -96,7 +96,7 @@ def __init__(
96
96
job_id : Optional [str ] = None ,
97
97
pipeline_root : Optional [str ] = None ,
98
98
parameter_values : Optional [Dict [str , Any ]] = None ,
99
- enable_caching : Optional [bool ] = True ,
99
+ enable_caching : Optional [bool ] = None ,
100
100
encryption_spec_key_name : Optional [str ] = None ,
101
101
labels : Optional [Dict [str , str ]] = None ,
102
102
credentials : Optional [auth_credentials .Credentials ] = None ,
@@ -121,7 +121,15 @@ def __init__(
121
121
Optional. The mapping from runtime parameter names to its values that
122
122
control the pipeline run.
123
123
enable_caching (bool):
124
- Optional. Whether to turn on caching for the run. Defaults to True.
124
+ Optional. Whether to turn on caching for the run.
125
+
126
+ If this is not set, defaults to the compile time settings, which
127
+ are True for all tasks by default, while users may specify
128
+ different caching options for individual tasks.
129
+
130
+ If this is set, the setting applies to all tasks in the pipeline.
131
+
132
+ Overrides the compile time settings.
125
133
encryption_spec_key_name (str):
126
134
Optional. The Cloud KMS resource identifier of the customer
127
135
managed encryption key used to protect the job. Has the
@@ -198,7 +206,8 @@ def __init__(
198
206
runtime_config = gca_pipeline_job_v1beta1 .PipelineJob .RuntimeConfig ()._pb
199
207
json_format .ParseDict (runtime_config_dict , runtime_config )
200
208
201
- _set_enable_caching_value (pipeline_job ["pipelineSpec" ], enable_caching )
209
+ if enable_caching is not None :
210
+ _set_enable_caching_value (pipeline_job ["pipelineSpec" ], enable_caching )
202
211
203
212
self ._gca_resource = gca_pipeline_job_v1beta1 .PipelineJob (
204
213
display_name = display_name ,
0 commit comments