@@ -64,7 +64,6 @@ class Step(Entity):
64
64
Attributes:
65
65
name (str): The name of the step.
66
66
step_type (StepTypeEnum): The type of the step.
67
-
68
67
"""
69
68
70
69
name : str = attr .ib (factory = str )
@@ -133,7 +132,7 @@ def __init__(
133
132
name (str): The name of the training step.
134
133
estimator (EstimatorBase): A `sagemaker.estimator.EstimatorBase` instance.
135
134
inputs (TrainingInput): A `sagemaker.inputs.TrainingInput` instance. Defaults to `None`.
136
- cache_config (CacheConfig): An instance to enable caching.
135
+ cache_config (CacheConfig): A `sagemaker.steps.CacheConfig` instance to enable caching.
137
136
"""
138
137
super (TrainingStep , self ).__init__ (name , StepTypeEnum .TRAINING )
139
138
self .estimator = estimator
@@ -171,7 +170,8 @@ def properties(self):
171
170
def to_request (self ) -> RequestType :
172
171
"""Updates the dictionary with cache configuration."""
173
172
request_dict = super ().to_request ()
174
- request_dict .update (self .cache_config .config )
173
+ if self .cache_config :
174
+ request_dict .update (self .cache_config .config )
175
175
176
176
return request_dict
177
177
@@ -293,7 +293,8 @@ def properties(self):
293
293
def to_request (self ) -> RequestType :
294
294
"""Updates the dictionary with cache configuration."""
295
295
request_dict = super ().to_request ()
296
- request_dict .update (self .cache_config .config )
296
+ if self .cache_config :
297
+ request_dict .update (self .cache_config .config )
297
298
298
299
return request_dict
299
300
@@ -378,7 +379,8 @@ def properties(self):
378
379
def to_request (self ) -> RequestType :
379
380
"""Get the request structure for workflow service calls."""
380
381
request_dict = super (ProcessingStep , self ).to_request ()
381
- request_dict .update (self .cache_config .config )
382
+ if self .cache_config :
383
+ request_dict .update (self .cache_config .config )
382
384
if self .property_files :
383
385
request_dict ["PropertyFiles" ] = [
384
386
property_file .expr for property_file in self .property_files
0 commit comments