Skip to content

Commit 163c668

Browse files
author
Verdi March
committed
Updated test_sklearn_processor_with_required_parameters() for framework processor
1 parent 047e049 commit 163c668

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

tests/unit/test_processing.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_sklearn_processor_with_required_parameters(
8787

8888
processor.run(entry_point="/local/path/to/processing_code.py")
8989

90-
expected_args = _get_expected_args(processor._current_job_name)
90+
expected_args = _get_expected_args(processor._current_job_name, "s3://abcd/ef")
9191

9292
sklearn_image_uri = (
9393
"246618743249.dkr.ecr.us-west-2.amazonaws.com/sagemaker-scikit-learn:{}-cpu-py3"
@@ -622,18 +622,30 @@ def _get_script_processor(sagemaker_session):
622622
def _get_expected_args(job_name, code_s3_uri="mocked_s3_uri_from_upload_data"):
623623
return {
624624
"inputs": [
625+
{
626+
"InputName": "input-1",
627+
"AppManaged": False,
628+
"S3Input": {
629+
"S3Uri": f"{code_s3_uri}/{job_name}/source/sourcedir.tar.gz",
630+
"LocalPath": "/opt/ml/processing/input/code/payload/",
631+
"S3DataType": "S3Prefix",
632+
"S3InputMode": "File",
633+
"S3DataDistributionType": "FullyReplicated",
634+
"S3CompressionType": "None",
635+
},
636+
},
625637
{
626638
"InputName": "code",
627639
"AppManaged": False,
628640
"S3Input": {
629-
"S3Uri": code_s3_uri,
641+
"S3Uri": f"{code_s3_uri}/{job_name}/source/runproc.sh",
630642
"LocalPath": "/opt/ml/processing/input/code",
631643
"S3DataType": "S3Prefix",
632644
"S3InputMode": "File",
633645
"S3DataDistributionType": "FullyReplicated",
634646
"S3CompressionType": "None",
635647
},
636-
}
648+
},
637649
],
638650
"output_config": {"Outputs": []},
639651
"job_name": job_name,
@@ -647,7 +659,7 @@ def _get_expected_args(job_name, code_s3_uri="mocked_s3_uri_from_upload_data"):
647659
"stopping_condition": None,
648660
"app_specification": {
649661
"ImageUri": CUSTOM_IMAGE_URI,
650-
"ContainerEntrypoint": ["python3", "/opt/ml/processing/input/code/processing_code.py"],
662+
"ContainerEntrypoint": ["/bin/bash", "/opt/ml/processing/input/code/runproc.sh"],
651663
},
652664
"environment": None,
653665
"network_config": None,

0 commit comments

Comments
 (0)