Skip to content

Commit c9ae621

Browse files
authored
Merge branch 'master' into fix-copyright-boilerplate
2 parents accf759 + 3261dfa commit c9ae621

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

src/sagemaker/spark/processing.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,9 @@ def get_run_args(
733733
):
734734
"""Returns a RunArgs object.
735735
736-
This object contains the normalized inputs, outputs
737-
and arguments needed when using a ``PySparkProcessor``
738-
in a :class:`~sagemaker.workflow.steps.ProcessingStep`.
736+
This object contains the normalized inputs, outputs and arguments
737+
needed when using a ``PySparkProcessor`` in a
738+
:class:`~sagemaker.workflow.steps.ProcessingStep`.
739739
740740
Args:
741741
submit_app (str): Path (local or S3) to Python file to submit to Spark
@@ -982,9 +982,9 @@ def get_run_args(
982982
):
983983
"""Returns a RunArgs object.
984984
985-
This object contains the normalized inputs, outputs
986-
and arguments needed when using a ``SparkJarProcessor``
987-
in a :class:`~sagemaker.workflow.steps.ProcessingStep`.
985+
This object contains the normalized inputs, outputs and arguments
986+
needed when using a ``SparkJarProcessor`` in a
987+
:class:`~sagemaker.workflow.steps.ProcessingStep`.
988988
989989
Args:
990990
submit_app (str): Path (local or S3) to Python file to submit to Spark

src/sagemaker/workflow/callback_step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CallbackOutput:
4949
"""
5050

5151
output_name: str = attr.ib(default=None)
52-
output_type: CallbackOutputTypeEnum = attr.ib(default=CallbackOutputTypeEnum.String.value)
52+
output_type: CallbackOutputTypeEnum = attr.ib(default=CallbackOutputTypeEnum.String)
5353

5454
def to_request(self) -> RequestType:
5555
"""Get the request structure for workflow service calls."""

tests/unit/sagemaker/workflow/test_callback_step.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ def test_callback_step():
5353
}
5454

5555

56+
def test_callback_step_default_values():
57+
param = ParameterInteger(name="MyInt")
58+
outputParam1 = CallbackOutput(output_name="output1")
59+
cb_step = CallbackStep(
60+
name="MyCallbackStep",
61+
depends_on=["TestStep"],
62+
sqs_queue_url="https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue",
63+
inputs={"arg1": "foo", "arg2": 5, "arg3": param},
64+
outputs=[outputParam1],
65+
)
66+
cb_step.add_depends_on(["SecondTestStep"])
67+
assert cb_step.to_request() == {
68+
"Name": "MyCallbackStep",
69+
"Type": "Callback",
70+
"DependsOn": ["TestStep", "SecondTestStep"],
71+
"SqsQueueUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue",
72+
"OutputParameters": [
73+
{"OutputName": "output1", "OutputType": "String"},
74+
],
75+
"Arguments": {"arg1": "foo", "arg2": 5, "arg3": param},
76+
}
77+
78+
5679
def test_callback_step_output_expr():
5780
param = ParameterInteger(name="MyInt")
5881
outputParam1 = CallbackOutput(output_name="output1", output_type=CallbackOutputTypeEnum.String)

0 commit comments

Comments
 (0)