@@ -1264,7 +1264,7 @@ def __init__(
1264
1264
image_uri (str): The URI of the Docker image to use for the
1265
1265
processing jobs (default: None).
1266
1266
command ([str]): The command to run, along with any command-line flags
1267
- to *precede* the ```entry_point script``` (default: ['python']).
1267
+ to *precede* the ```code script``` (default: ['python']).
1268
1268
volume_size_in_gb (int): Size in GB of the EBS volume
1269
1269
to use for storing data during processing (default: 30).
1270
1270
volume_kms_key (str): A KMS key for the processing volume (default: None).
@@ -1361,7 +1361,7 @@ def _pre_init_normalization(
1361
1361
1362
1362
def run ( # type: ignore[override]
1363
1363
self ,
1364
- entry_point ,
1364
+ code ,
1365
1365
source_dir = None ,
1366
1366
dependencies = None ,
1367
1367
git_config = None ,
@@ -1377,9 +1377,9 @@ def run( # type: ignore[override]
1377
1377
"""Runs a processing job.
1378
1378
1379
1379
Args:
1380
- entrypoint (str): Path (absolute or relative) to the local Python source
1380
+ code (str): Path (absolute or relative) to the local Python source
1381
1381
file which should be executed as the entry point to training. If
1382
- ``source_dir`` is specified, then ``entry_point `` must point to a file
1382
+ ``source_dir`` is specified, then ``code `` must point to a file
1383
1383
located at the root of ``source_dir``.
1384
1384
source_dir (str): Path (absolute, relative or an S3 URI) to a directory
1385
1385
with any other training source code dependencies aside from the entry
@@ -1464,9 +1464,7 @@ def run( # type: ignore[override]
1464
1464
if job_name is None :
1465
1465
job_name = self ._generate_current_job_name ()
1466
1466
1467
- estimator = self ._upload_payload (
1468
- entry_point , source_dir , dependencies , git_config , job_name
1469
- )
1467
+ estimator = self ._upload_payload (code , source_dir , dependencies , git_config , job_name )
1470
1468
inputs = self ._patch_inputs_with_payload (
1471
1469
inputs , estimator ._hyperparameters ["sagemaker_submit_directory" ]
1472
1470
)
@@ -1511,13 +1509,14 @@ def _generate_framework_script(self, user_script: str) -> str:
1511
1509
This script implements the "framework" functionality for setting up your code:
1512
1510
Untar-ing the sourcedir bundle in the ```code``` input; installing extra
1513
1511
runtime dependencies if specified; and then invoking the ```command``` and
1514
- ```entry_point ``` configured for the job.
1512
+ ```code ``` configured for the job.
1515
1513
1516
1514
Args:
1517
- user_script (str): Relative path to ```entry_point ``` in the source bundle
1515
+ user_script (str): Relative path to ```code ``` in the source bundle
1518
1516
- e.g. 'process.py'.
1519
1517
"""
1520
- return dedent ("""\
1518
+ return dedent (
1519
+ """\
1521
1520
#!/bin/bash
1522
1521
1523
1522
cd /opt/ml/processing/input/code/
@@ -1529,7 +1528,8 @@ def _generate_framework_script(self, user_script: str) -> str:
1529
1528
[[ -f 'requirements.txt' ]] && pip install -r requirements.txt
1530
1529
1531
1530
{entry_point_command} {entry_point} "$@"
1532
- """ ).format (
1531
+ """
1532
+ ).format (
1533
1533
entry_point_command = " " .join (self .command ),
1534
1534
entry_point = user_script ,
1535
1535
)
@@ -1605,7 +1605,7 @@ def _set_entrypoint(self, command, user_script_name):
1605
1605
command ([str]): Ignored in favor of self.framework_entrypoint_command
1606
1606
user_script_name (str): A filename with an extension.
1607
1607
"""
1608
-
1608
+
1609
1609
user_script_location = str (
1610
1610
pathlib .PurePosixPath (
1611
1611
self ._CODE_CONTAINER_BASE_PATH , self ._CODE_CONTAINER_INPUT_NAME , user_script_name
0 commit comments