Skip to content

Commit acc8d17

Browse files
committed
chore: add tests
1 parent d3ff4f4 commit acc8d17

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/integ/sagemaker/jumpstart/estimator/test_jumpstart_estimator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
2020

2121
from sagemaker.jumpstart.estimator import JumpStartEstimator
22+
from sagemaker.jumpstart.types import JumpStartModelSpecs
2223
import tests
2324
from tests.integ.sagemaker.jumpstart.constants import (
2425
ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID,
@@ -169,6 +170,9 @@ def test_gated_model_training_v2(setup):
169170
sagemaker_session=get_sm_session(),
170171
)
171172

173+
assert isinstance(attached_estimator._internal_config.specs, JumpStartModelSpecs)
174+
assert attached_estimator._internal_config.specs.model_id == model_id
175+
172176
# uses ml.g5.2xlarge instance
173177
predictor = attached_estimator.deploy(
174178
tags=[{"Key": JUMPSTART_TAG, "Value": os.environ[ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID]}],

tests/integ/sagemaker/jumpstart/model/test_jumpstart_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import pytest
1919
from sagemaker.enums import EndpointType
20+
from sagemaker.jumpstart.types import JumpStartModelSpecs
2021
from sagemaker.predictor import retrieve_default
2122

2223
import tests.integ
@@ -223,6 +224,8 @@ def test_jumpstart_gated_model_inference_component_enabled(setup):
223224
assert model.model_id == model_id
224225
assert model.endpoint_name == predictor.endpoint_name
225226
assert model.inference_component_name == predictor.component_name
227+
assert isinstance(model._internal_config.specs, JumpStartModelSpecs)
228+
assert model._internal_config.specs.model_id == model_id
226229

227230

228231
@mock.patch("sagemaker.jumpstart.cache.JUMPSTART_LOGGER.warning")

0 commit comments

Comments
 (0)