Skip to content

Commit b8fcd1b

Browse files
authored
Merge pull request aws#24 from verdimrc/fp-fix-pylint
Fix pylint warnings on `command` default.
2 parents 75e7645 + 0e2bf64 commit b8fcd1b

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

src/sagemaker/huggingface/processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
pytorch_version=None,
3737
py_version="py36",
3838
image_uri=None,
39-
command=["python"],
39+
command=None,
4040
volume_size_in_gb=30,
4141
volume_kms_key=None,
4242
output_kms_key=None,

src/sagemaker/mxnet/processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
instance_type,
3535
py_version="py3", # New kwarg
3636
image_uri=None,
37-
command=["python"],
37+
command=None,
3838
volume_size_in_gb=30,
3939
volume_kms_key=None,
4040
output_kms_key=None,

src/sagemaker/processing.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import pathlib
2323
import logging
2424
from textwrap import dedent
25-
from typing import Dict, List, Optional, Tuple
25+
from typing import Dict, List, Optional
2626
import attr
2727

2828
from six.moves.urllib.parse import urlparse
@@ -1231,7 +1231,7 @@ def __init__(
12311231
instance_type,
12321232
py_version="py3", # New kwarg
12331233
image_uri=None,
1234-
command=["python3"],
1234+
command=None,
12351235
volume_size_in_gb=30,
12361236
volume_kms_key=None,
12371237
output_kms_key=None,
@@ -1265,7 +1265,8 @@ def __init__(
12651265
image_uri (str): The URI of the Docker image to use for the
12661266
processing jobs (default: None).
12671267
command ([str]): The command to run, along with any command-line flags
1268-
to *precede* the ```code script``` (default: ['python']).
1268+
to *precede* the ```code script```. Example: ["python3", "-v"]. If not
1269+
provided, ["python"] will be chosen (default: None).
12691270
volume_size_in_gb (int): Size in GB of the EBS volume
12701271
to use for storing data during processing (default: 30).
12711272
volume_kms_key (str): A KMS key for the processing volume (default: None).
@@ -1295,6 +1296,9 @@ def __init__(
12951296
object that configures network isolation, encryption of
12961297
inter-container traffic, security group IDs, and subnets (default: None).
12971298
"""
1299+
if not command:
1300+
command = ["python"]
1301+
12981302
self.estimator_cls = estimator_cls
12991303
self.framework_version = framework_version
13001304
self.py_version = py_version
@@ -1549,6 +1553,7 @@ def run( # type: ignore[override]
15491553
)
15501554

15511555
def _pack_and_upload_code(self, code, source_dir, dependencies, git_config, job_name, inputs):
1556+
"""Pack local code bundle and upload to Amazon S3."""
15521557
if code.startswith("s3://"):
15531558
return code, inputs, job_name
15541559

src/sagemaker/pytorch/processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
instance_type,
3535
py_version="py3", # New kwarg
3636
image_uri=None,
37-
command=["python"],
37+
command=None,
3838
volume_size_in_gb=30,
3939
volume_kms_key=None,
4040
output_kms_key=None,

src/sagemaker/sklearn/processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848
instance_type,
4949
py_version="py3", # New kwarg
5050
image_uri=None,
51-
command=["python3"],
51+
command=None,
5252
volume_size_in_gb=30,
5353
volume_kms_key=None,
5454
output_kms_key=None,

src/sagemaker/tensorflow/processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
instance_type,
3535
py_version="py3", # New kwarg
3636
image_uri=None,
37-
command=["python"],
37+
command=None,
3838
volume_size_in_gb=30,
3939
volume_kms_key=None,
4040
output_kms_key=None,

src/sagemaker/xgboost/processing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
instance_type,
3535
py_version="py3", # New kwarg
3636
image_uri=None,
37-
command=["python"],
37+
command=None,
3838
volume_size_in_gb=30,
3939
volume_kms_key=None,
4040
output_kms_key=None,

0 commit comments

Comments
 (0)