diff --git a/src/sagemaker/workflow/steps.py b/src/sagemaker/workflow/steps.py index acece9e8df..1ea0e77c11 100644 --- a/src/sagemaker/workflow/steps.py +++ b/src/sagemaker/workflow/steps.py @@ -496,6 +496,7 @@ def __init__( self.job_arguments = job_arguments self.code = code self.property_files = property_files + self.job_name = name # Examine why run method in sagemaker.processing.Processor mutates the processor instance # by setting the instance's arguments attribute. Refactor Processor.run, if possible. @@ -514,6 +515,7 @@ def arguments(self) -> RequestType: ProcessingJobName and ExperimentConfig cannot be included in the arguments. """ normalized_inputs, normalized_outputs = self.processor._normalize_args( + job_name=self.job_name, arguments=self.job_arguments, inputs=self.inputs, outputs=self.outputs, diff --git a/tests/unit/sagemaker/workflow/test_steps.py b/tests/unit/sagemaker/workflow/test_steps.py index 42c3bed7b6..6e02f0ca25 100644 --- a/tests/unit/sagemaker/workflow/test_steps.py +++ b/tests/unit/sagemaker/workflow/test_steps.py @@ -520,6 +520,7 @@ def test_processing_step_normalizes_args(mock_normalize_args, sagemaker_session) mock_normalize_args.return_value = [step.inputs, step.outputs] step.to_request() mock_normalize_args.assert_called_with( + job_name=step.name, arguments=step.job_arguments, inputs=step.inputs, outputs=step.outputs,