Skip to content

Commit 6827073

Browse files
committed
fix: forward network_isolation parameter to Estimators when False
A sagemaker config file would override this parameter if it was True in the config but False in the Estimator parameters. Closes #4542
1 parent 74c624a commit 6827073

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sagemaker/estimator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,6 +2434,7 @@ def start_new(cls, estimator, inputs, experiment_config):
24342434
"""
24352435
train_args = cls._get_train_args(estimator, inputs, experiment_config)
24362436

2437+
logger.debug("Train args after processing defaults: %s", train_args)
24372438
estimator.sagemaker_session.train(**train_args)
24382439

24392440
return cls(estimator.sagemaker_session, estimator._current_job_name)
@@ -2501,6 +2502,9 @@ def _get_train_args(cls, estimator, inputs, experiment_config):
25012502
# which is parsed in execution time
25022503
if estimator.enable_network_isolation():
25032504
train_args["enable_network_isolation"] = estimator.enable_network_isolation()
2505+
if estimator.enable_network_isolation() is False:
2506+
train_args["enable_network_isolation"] = estimator.enable_network_isolation()
2507+
25042508

25052509
if estimator.max_retry_attempts is not None:
25062510
train_args["retry_strategy"] = {"MaximumRetryAttempts": estimator.max_retry_attempts}

0 commit comments

Comments
 (0)