@@ -340,6 +340,7 @@ def __init__(
340
340
when training on Amazon SageMaker. If 'git_config' is provided,
341
341
'source_dir' should be a relative location to a directory in the Git
342
342
repo.
343
+ (Default: None).
343
344
344
345
.. admonition:: Example
345
346
@@ -353,7 +354,6 @@ def __init__(
353
354
if you need 'train.py'
354
355
as the entry point and 'test.py' as the training source code, you can assign
355
356
entry_point='train.py', source_dir='src'.
356
- (Default: None).
357
357
git_config (Optional[dict[str, str]]): Git configurations used for cloning
358
358
files, including ``repo``, ``branch``, ``commit``,
359
359
``2FA_enabled``, ``username``, ``password`` and ``token``. The
@@ -363,18 +363,6 @@ def __init__(
363
363
'master' is used. If you don't provide ``commit``, the latest
364
364
commit in the specified branch is used.
365
365
366
- .. admonition:: Example
367
-
368
- The following config:
369
-
370
- >>> git_config = {'repo': 'https://github.com/aws/sagemaker-python-sdk.git',
371
- >>> 'branch': 'test-branch-git-config',
372
- >>> 'commit': '329bfcf884482002c05ff7f44f62599ebc9f445a'}
373
-
374
- results in cloning the repo specified in 'repo', then
375
- checking out the 'master' branch, and checking out the specified
376
- commit.
377
-
378
366
``2FA_enabled``, ``username``, ``password`` and ``token`` are
379
367
used for authentication. For GitHub (or other Git) accounts, set
380
368
``2FA_enabled`` to 'True' if two-factor authentication is
@@ -405,6 +393,17 @@ def __init__(
405
393
the SageMaker Python SDK attempts to use either the CodeCommit
406
394
credential helper or local credential storage for authentication.
407
395
(Default: None).
396
+
397
+ .. admonition:: Example
398
+ The following config:
399
+
400
+ >>> git_config = {'repo': 'https://github.com/aws/sagemaker-python-sdk.git',
401
+ >>> 'branch': 'test-branch-git-config',
402
+ >>> 'commit': '329bfcf884482002c05ff7f44f62599ebc9f445a'}
403
+
404
+ results in cloning the repo specified in 'repo', then
405
+ checking out the 'master' branch, and checking out the specified
406
+ commit.
408
407
container_log_level (Optional[Union[int, PipelineVariable]]): The log level to use
409
408
within the container. Valid values are defined in the Python logging module.
410
409
(Default: None).
@@ -420,8 +419,9 @@ def __init__(
420
419
must point to a file located at the root of ``source_dir``.
421
420
If 'git_config' is provided, 'entry_point' should be
422
421
a relative location to the Python source file in the Git repo.
422
+ (Default: None).
423
423
424
- Example:
424
+ .. admonition:: Example
425
425
With the following GitHub repo directory structure:
426
426
427
427
>>> |----- README.md
@@ -430,18 +430,16 @@ def __init__(
430
430
>>> |----- test.py
431
431
432
432
You can assign entry_point='src/train.py'.
433
-
434
- (Default: None).
435
433
dependencies (Optional[list[str]]): A list of absolute or relative paths to directories
436
434
with any additional libraries that should be exported
437
435
to the container. The library folders are
438
436
copied to SageMaker in the same folder where the entrypoint is
439
437
copied. If 'git_config' is provided, 'dependencies' should be a
440
438
list of relative locations to directories with any additional
441
- libraries needed in the Git repo.
439
+ libraries needed in the Git repo. This is not supported with "local code"
440
+ in Local Mode. (Default: None).
442
441
443
442
.. admonition:: Example
444
-
445
443
The following Estimator call:
446
444
447
445
>>> Estimator(entry_point='train.py',
@@ -455,9 +453,6 @@ def __init__(
455
453
>>> |------ train.py
456
454
>>> |------ common
457
455
>>> |------ virtual-env
458
-
459
- This is not supported with "local code" in Local Mode.
460
- (Default: None).
461
456
instance_groups (Optional[list[:class:`sagemaker.instance_group.InstanceGroup`]]):
462
457
A list of ``InstanceGroup`` objects for launching a training job with a
463
458
heterogeneous cluster. For example:
@@ -475,8 +470,7 @@ def __init__(
475
470
through the SageMaker generic and framework estimator classes, see
476
471
`Train Using a Heterogeneous Cluster
477
472
<https://docs.aws.amazon.com/sagemaker/latest/dg/train-heterogeneous-cluster.html>`_
478
- in the *Amazon SageMaker developer guide*.
479
- (Default: None).
473
+ in the *Amazon SageMaker developer guide*. (Default: None).
480
474
training_repository_access_mode (Optional[str]): Specifies how SageMaker accesses the
481
475
Docker image that contains the training algorithm (Default: None).
482
476
Set this to one of the following values:
@@ -797,7 +791,7 @@ def deploy(
797
791
when training on Amazon SageMaker. If 'git_config' is provided,
798
792
'source_dir' should be a relative location to a directory in the Git repo.
799
793
If the directory points to S3, no code is uploaded and the S3 location
800
- is used instead.
794
+ is used instead. (Default: None).
801
795
802
796
.. admonition:: Example
803
797
@@ -809,7 +803,6 @@ def deploy(
809
803
>>> |----- test.py
810
804
811
805
You can assign entry_point='inference.py', source_dir='src'.
812
- (Default: None).
813
806
code_location (Optional[str]): Name of the S3 bucket where custom code is
814
807
uploaded (Default: None). If not specified, the default bucket
815
808
created by ``sagemaker.session.Session`` is used. (Default: None).
0 commit comments