File tree Expand file tree Collapse file tree 2 files changed +1
-11
lines changed
src/sagemaker/jumpstart/factory
tests/unit/sagemaker/jumpstart/model Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -674,11 +674,7 @@ def _add_config_name_to_init_kwargs(kwargs: JumpStartModelInitKwargs) -> JumpSta
674
674
resolved_config = specs .inference_configs .configs [kwargs .config_name ].resolved_config
675
675
supported_instance_types = resolved_config .get ("supported_inference_instance_types" , [])
676
676
if kwargs .instance_type not in supported_instance_types :
677
- raise ValueError (
678
- f"Instance type { kwargs .instance_type } "
679
- f"is not supported for config { kwargs .config_name } ."
680
- )
681
-
677
+ JUMPSTART_LOGGER .warning ("Overriding instance type to %s" , kwargs .instance_type )
682
678
return kwargs
683
679
684
680
Original file line number Diff line number Diff line change @@ -1941,12 +1941,6 @@ def test_model_set_deployment_config_incompatible_instance_type_or_name(
1941
1941
mock_get_model_specs .reset_mock ()
1942
1942
mock_model_deploy .reset_mock ()
1943
1943
mock_get_model_specs .side_effect = get_prototype_spec_with_configs
1944
- with pytest .raises (ValueError ) as error :
1945
- model .set_deployment_config ("neuron-inference" , "ml.inf2.32xlarge" )
1946
- assert (
1947
- "Instance type ml.inf2.32xlarge is not supported for config neuron-inference."
1948
- in str (error )
1949
- )
1950
1944
1951
1945
with pytest .raises (ValueError ) as error :
1952
1946
model .set_deployment_config ("neuron-inference-unknown-name" , "ml.inf2.32xlarge" )
You can’t perform that action at this time.
0 commit comments