Skip to content

Commit 85e8286

Browse files
authored
Always add code channel, regardless of network isolation (#1657)
1 parent 6581e5c commit 85e8286

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/sagemaker/job.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,16 @@ def _load_config(inputs, estimator, expand_role=True, validate_uri=True):
103103
input_config = [] if input_config is None else input_config
104104
input_config.append(model_channel)
105105

106-
# Don't create code channel when access configs are used
107-
if estimator.enable_network_isolation() and hub_access_config is None:
108-
code_channel = _Job._prepare_channel(
109-
input_config,
110-
estimator.code_uri,
111-
estimator.code_channel_name,
112-
validate_uri,
113-
)
106+
code_channel = _Job._prepare_channel(
107+
input_config,
108+
estimator.code_uri,
109+
estimator.code_channel_name,
110+
validate_uri,
111+
)
114112

115-
if code_channel:
116-
input_config = [] if input_config is None else input_config
117-
input_config.append(code_channel)
113+
if code_channel:
114+
input_config = [] if input_config is None else input_config
115+
input_config.append(code_channel)
118116

119117
return {
120118
"input_config": input_config,

0 commit comments

Comments
 (0)