File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
tests/unit/sagemaker/workflow Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -160,9 +160,6 @@ def arguments(self) -> RequestType:
160
160
NOTE: The CreateTrainingJob request is not quite the args list that workflow needs.
161
161
The TrainingJobName and ExperimentConfig attributes cannot be included.
162
162
"""
163
- self .estimator .disable_profiler = True
164
- self .estimator .profiler_config = None
165
- self .estimator .profiler_rules = None
166
163
167
164
self .estimator ._prepare_for_training ()
168
165
train_args = _TrainingJob ._get_train_args (
Original file line number Diff line number Diff line change 21
21
PropertyMock ,
22
22
)
23
23
24
+ from sagemaker .debugger import ProfilerConfig , ProfilerRule
24
25
from sagemaker .estimator import Estimator
25
26
from sagemaker .inputs import TrainingInput , TransformInput , CreateModelInput
26
27
from sagemaker .model import Model
@@ -112,6 +113,8 @@ def test_training_step(sagemaker_session):
112
113
role = ROLE ,
113
114
instance_count = 1 ,
114
115
instance_type = "c4.4xlarge" ,
116
+ profiler_config = ProfilerConfig (system_monitor_interval_millis = 500 ),
117
+ rules = [],
115
118
sagemaker_session = sagemaker_session ,
116
119
)
117
120
inputs = TrainingInput (f"s3://{ BUCKET } /train_manifest" )
@@ -144,6 +147,10 @@ def test_training_step(sagemaker_session):
144
147
},
145
148
"RoleArn" : ROLE ,
146
149
"StoppingCondition" : {"MaxRuntimeInSeconds" : 86400 },
150
+ "ProfilerConfig" : {
151
+ "ProfilingIntervalInMilliseconds" : 500 ,
152
+ "S3OutputPath" : f"s3://{ BUCKET } /" ,
153
+ }
147
154
},
148
155
"CacheConfig" : {"Enabled" : True , "ExpireAfter" : "PT1H" },
149
156
}
You can’t perform that action at this time.
0 commit comments