diff --git a/src/sagemaker/jumpstart/model.py b/src/sagemaker/jumpstart/model.py index f3e18c306d..78c36cb954 100644 --- a/src/sagemaker/jumpstart/model.py +++ b/src/sagemaker/jumpstart/model.py @@ -922,12 +922,13 @@ def _convert_to_deployment_config_metadata( instance_rate = get_instance_rate_per_hour( instance_type=default_inference_instance_type, region=self.region ) - instance_rate_metric = JumpStartBenchmarkStat(instance_rate) + if instance_rate is not None: + instance_rate_metric = JumpStartBenchmarkStat(instance_rate) - if benchmark_metrics is None: - benchmark_metrics = [instance_rate_metric] - else: - benchmark_metrics.append(instance_rate_metric) + if benchmark_metrics is None: + benchmark_metrics = [instance_rate_metric] + else: + benchmark_metrics.append(instance_rate_metric) init_kwargs = get_init_kwargs( model_id=self.model_id,