Skip to content

Commit 0c07814

Browse files
committed
fix(DataWranglerProcessor): add source_dir arg
Maintain API compatibility with the base Processor class
1 parent d326c9f commit 0c07814

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/sagemaker/wrangler/processing.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def _normalize_args(
114114
inputs=None,
115115
outputs=None,
116116
code=None,
117+
source_dir=None,
117118
kms_key=None,
118119
):
119120
"""Normalizes the arguments so that they can be passed to the job run
@@ -130,16 +131,27 @@ def _normalize_args(
130131
outputs (list[:class:`~sagemaker.processing.ProcessingOutput`]): Outputs for
131132
the processing job. These can be specified as either path strings or
132133
:class:`~sagemaker.processing.ProcessingOutput` objects (default: None).
133-
code (str): This can be an S3 URI or a local path to a file with the framework
134-
script to run (default: None). A no op in the base class.
134+
code (str): An S3 URI or a local path to a file with the user script to run.
135+
This is ignored in the base class (default: None).
136+
source_dir (str): An S3 URI or a local path to a folder whose full contents
137+
should be uploaded to the processing job as code. This is ignored in the
138+
base class (default: None).
135139
kms_key (str): The ARN of the KMS key that is used to encrypt the
136140
user code file (default: None).
137141
"""
138142
inputs = inputs or []
139143
found = any(element.input_name == "flow" for element in inputs)
140144
if not found:
141145
inputs.append(self._get_recipe_input())
142-
return super()._normalize_args(job_name, arguments, inputs, outputs, code, kms_key)
146+
return super()._normalize_args(
147+
job_name=job_name,
148+
arguments=arguments,
149+
inputs=inputs,
150+
outputs=outputs,
151+
code=code,
152+
source_dir=source_dir,
153+
kms_key=kms_key,
154+
)
143155

144156
def _get_recipe_input(self):
145157
"""Creates a ProcessingInput with Data Wrangler recipe uri and appends it to inputs"""

0 commit comments

Comments
 (0)