File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff 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
16541655def get_hub_access_config (hub_content_arn : Optional [str ]):
You can’t perform that action at this time.
0 commit comments