Skip to content

Commit 9fd8bc2

Browse files
author
Chia-Eng
committed
Address PR comments
1 parent 76a72fc commit 9fd8bc2

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/sagemaker/estimator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,8 @@ def __init__(
18081808
``disable_profiler`` parameter to ``True``.
18091809
disable_profiler (bool): Specifies whether Debugger monitoring and profiling
18101810
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.
18111813
"""
18121814
self.image_uri = image_uri
18131815
self.hyperparam_dict = hyperparameters.copy() if hyperparameters else {}

tests/unit/test_estimator.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2697,24 +2697,7 @@ def test_add_environment_variables_to_train_args(sagemaker_session):
26972697

26982698
sagemaker_session.train.assert_called_once()
26992699
args = sagemaker_session.train.call_args[1]
2700-
assert args["environment"]
2701-
2702-
def test_no_environment_variables_in_train_args(sagemaker_session):
2703-
e = Estimator(
2704-
IMAGE_URI,
2705-
ROLE,
2706-
INSTANCE_COUNT,
2707-
INSTANCE_TYPE,
2708-
output_path=OUTPUT_PATH,
2709-
sagemaker_session=sagemaker_session,
2710-
environment=None,
2711-
)
2712-
2713-
e.fit()
2714-
2715-
sagemaker_session.train.assert_called_once()
2716-
args = sagemaker_session.train.call_args[1]
2717-
assert not args["environment"]
2700+
assert args["environment"] == ENV_INPUT
27182701

27192702
def test_generic_to_fit_with_sagemaker_metrics_enabled(sagemaker_session):
27202703
e = Estimator(

0 commit comments

Comments
 (0)