Skip to content

Commit b44f722

Browse files
committed
fix
1 parent b3e6fde commit b44f722

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sagemaker/jumpstart/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,14 +1641,15 @@ def remove_env_var_from_estimator_kwargs_if_model_access_config_present(
16411641
init_kwargs (dict): Dictionary of kwargs when Estimator is instantiated.
16421642
accept_eula (Optional[bool]): Whether or not the EULA was accepted, optionally passed in to Estimator.fit().
16431643
"""
1644-
if model_access_config is not None and init_kwargs.get("environment") is not None:
1644+
if model_access_config is not None and init_kwargs.get("environment") is not None and init_kwargs.get("model_uri") is not None:
16451645
if (
16461646
constants.SAGEMAKER_GATED_MODEL_S3_URI_TRAINING_ENV_VAR_KEY
16471647
in init_kwargs["environment"]
16481648
):
16491649
del init_kwargs["environment"][
16501650
constants.SAGEMAKER_GATED_MODEL_S3_URI_TRAINING_ENV_VAR_KEY
16511651
]
1652+
del init_kwargs["environment"]["accept_eula"]
16521653

16531654

16541655
def get_hub_access_config(hub_content_arn: Optional[str]):

0 commit comments

Comments
 (0)