Skip to content

Commit f5b4263

Browse files
feature: Add tests for RegisterModel with repack output
1 parent 4643394 commit f5b4263

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/unit/sagemaker/workflow/test_step_collections.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,32 @@ def test_register_model_with_model_repack_with_pipeline_model(
802802
raise Exception("A step exists in the collection of an invalid type.")
803803

804804

805+
def test_register_model_with_model_repack_with_repack_output_path(model):
806+
repack_output_path = "s3://{BUCKET}/repack_output"
807+
register_model = RegisterModel(
808+
name="RegisterModelStep",
809+
model=model,
810+
content_types=["content_type"],
811+
response_types=["response_type"],
812+
inference_instances=["inference_instance"],
813+
transform_instances=["transform_instance"],
814+
model_package_group_name="mpg",
815+
approval_status="Approved",
816+
description="description",
817+
depends_on=["TestStep"],
818+
tags=[{"Key": "myKey", "Value": "myValue"}],
819+
repack_output_path=repack_output_path,
820+
)
821+
822+
request_dicts = register_model.request_dicts()
823+
824+
for request_dict in request_dicts:
825+
if request_dict["Type"] == "Training":
826+
arguments = request_dict["Arguments"]
827+
assert arguments["DebugHookConfig"]["S3OutputPath"] == repack_output_path
828+
assert arguments["OutputDataConfig"]["S3OutputPath"] == repack_output_path
829+
830+
805831
def test_estimator_transformer(estimator):
806832
model_data = f"s3://{BUCKET}/model.tar.gz"
807833
model_inputs = CreateModelInput(

0 commit comments

Comments
 (0)