File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -264,8 +264,7 @@ def __init__(
264
264
``disable_profiler`` parameter to ``True``.
265
265
disable_profiler (bool): Specifies whether Debugger monitoring and profiling
266
266
will be disabled (default: ``False``).
267
- environment (dict[str, str]) : A string to string map contains environment
268
- variables to set in the Docker container.
267
+ environment (dict[str, str]) : Environment variables to be set for use during training job (default: ``None``)
269
268
270
269
"""
271
270
instance_count = renamed_kwargs (
@@ -1808,8 +1807,7 @@ def __init__(
1808
1807
``disable_profiler`` parameter to ``True``.
1809
1808
disable_profiler (bool): Specifies whether Debugger monitoring and profiling
1810
1809
will be disabled (default: ``False``).
1811
- environment (dict[str, str]) : A string to string map contains environment
1812
- variables to set in the Docker container.
1810
+ environment (dict[str, str]) : Environment variables to be set for use during training job (default: ``None``)
1813
1811
"""
1814
1812
self .image_uri = image_uri
1815
1813
self .hyperparam_dict = hyperparameters .copy () if hyperparameters else {}
Original file line number Diff line number Diff line change @@ -526,8 +526,7 @@ def train( # noqa: C901
526
526
profiler_rule_configs (list[dict]): A list of profiler rule configurations.
527
527
profiler_config (dict): Configuration for how profiling information is emitted
528
528
with SageMaker Profiler. (default: ``None``).
529
- environment (dict[str, str]) : A string to string map contains environment
530
- variables to set in the Docker container.
529
+ environment (dict[str, str]) : Environment variables to be set for use during training job (default: ``None``)
531
530
532
531
Returns:
533
532
str: ARN of the training job, if it is created.
@@ -662,8 +661,7 @@ def _get_train_request( # noqa: C901
662
661
profiler_rule_configs (list[dict]): A list of profiler rule configurations.
663
662
profiler_config(dict): Configuration for how profiling information is emitted with
664
663
SageMaker Profiler. (default: ``None``).
665
- environment (dict[str, str]) : A string to string map contains environment
666
- variables to set in the Docker container.
664
+ environment (dict[str, str]) : Environment variables to be set for use during training job (default: ``None``)
667
665
668
666
Returns:
669
667
Dict: a training request dict
Original file line number Diff line number Diff line change 36
36
PARAMETER_SERVER_DISTRIBUTION = {"parameter_server" : {"enabled" : True }}
37
37
MPI_DISTRIBUTION = {"mpi" : {"enabled" : True }}
38
38
TAGS = [{"Key" : "some-key" , "Value" : "some-value" }]
39
+ ENV_INPUT = {'env_key1' : 'env_val1' , 'env_key2' : 'env_val2' , 'env_key3' : 'env_val3' }
39
40
40
41
41
42
def test_mnist_with_checkpoint_config (
@@ -59,6 +60,7 @@ def test_mnist_with_checkpoint_config(
59
60
metric_definitions = [{"Name" : "train:global_steps" , "Regex" : r"global_step\/sec:\s(.*)" }],
60
61
checkpoint_s3_uri = checkpoint_s3_uri ,
61
62
checkpoint_local_path = checkpoint_local_path ,
63
+ environment = ENV_INPUT ,
62
64
)
63
65
inputs = estimator .sagemaker_session .upload_data (
64
66
path = os .path .join (MNIST_RESOURCE_PATH , "data" ), key_prefix = "scriptmode/mnist"
@@ -83,6 +85,7 @@ def test_mnist_with_checkpoint_config(
83
85
TrainingJobName = training_job_name
84
86
)["CheckpointConfig" ]
85
87
assert actual_training_checkpoint_config == expected_training_checkpoint_config
88
+ assert actual_training_checkpoint_config ['Environment' ] == ENV_INPUT
86
89
87
90
88
91
def test_server_side_encryption (sagemaker_session , tf_full_version , tf_full_py_version ):
You can’t perform that action at this time.
0 commit comments