Skip to content

Commit abc7cd5

Browse files
Add test to custom repack output path
Fixes #2803
1 parent be0b306 commit abc7cd5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/unit/sagemaker/workflow/test_utils.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,22 @@ def test_repack_model_step_with_source_dir(estimator, source_dir):
207207
assert step.properties.TrainingJobName.expr == {
208208
"Get": "Steps.MyRepackModelStep.TrainingJobName"
209209
}
210+
211+
212+
def test_repack_model_step_with_output_path(estimator):
213+
repack_output_path = "s3://{BUCKET}/repack_output"
214+
model_data = f"s3://{BUCKET}/model.tar.gz"
215+
entry_point = "inference.py"
216+
step = _RepackModelStep(
217+
name="MyRepackModelStep",
218+
sagemaker_session=estimator.sagemaker_session,
219+
role=estimator.role,
220+
model_data=model_data,
221+
entry_point=entry_point,
222+
source_dir=source_dir,
223+
repack_output_path=repack_output_path,
224+
)
225+
request_dict = step.to_request()
226+
227+
assert request_dict["Arguments"]["DebugHookConfig"]["S3OutputPath"] == repack_output_path
228+
assert request_dict["Arguments"]["OutputDataConfig"]["S3OutputPath"] == repack_output_path

0 commit comments

Comments
 (0)