|
22 | 22 | import pathlib
|
23 | 23 | import logging
|
24 | 24 | from textwrap import dedent
|
25 |
| -from typing import Dict, List, Optional, Tuple |
| 25 | +from typing import Dict, List, Optional |
26 | 26 | import attr
|
27 | 27 |
|
28 | 28 | from six.moves.urllib.parse import urlparse
|
@@ -1231,7 +1231,7 @@ def __init__(
|
1231 | 1231 | instance_type,
|
1232 | 1232 | py_version="py3", # New kwarg
|
1233 | 1233 | image_uri=None,
|
1234 |
| - command=["python3"], |
| 1234 | + command=None, |
1235 | 1235 | volume_size_in_gb=30,
|
1236 | 1236 | volume_kms_key=None,
|
1237 | 1237 | output_kms_key=None,
|
@@ -1265,7 +1265,8 @@ def __init__(
|
1265 | 1265 | image_uri (str): The URI of the Docker image to use for the
|
1266 | 1266 | processing jobs (default: None).
|
1267 | 1267 | 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). |
1269 | 1270 | volume_size_in_gb (int): Size in GB of the EBS volume
|
1270 | 1271 | to use for storing data during processing (default: 30).
|
1271 | 1272 | volume_kms_key (str): A KMS key for the processing volume (default: None).
|
@@ -1295,6 +1296,9 @@ def __init__(
|
1295 | 1296 | object that configures network isolation, encryption of
|
1296 | 1297 | inter-container traffic, security group IDs, and subnets (default: None).
|
1297 | 1298 | """
|
| 1299 | + if not command: |
| 1300 | + command = ["python"] |
| 1301 | + |
1298 | 1302 | self.estimator_cls = estimator_cls
|
1299 | 1303 | self.framework_version = framework_version
|
1300 | 1304 | self.py_version = py_version
|
@@ -1549,6 +1553,7 @@ def run( # type: ignore[override]
|
1549 | 1553 | )
|
1550 | 1554 |
|
1551 | 1555 | 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.""" |
1552 | 1557 | if code.startswith("s3://"):
|
1553 | 1558 | return code, inputs, job_name
|
1554 | 1559 |
|
|
0 commit comments