Skip to content

Commit 490af37

Browse files
committed
chore: add private field to js classes for model specs
1 parent ce43606 commit 490af37

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/sagemaker/jumpstart/estimator.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,16 @@ def _validate_model_id_and_get_type_hook():
534534
if not self.model_type and not hub_arn:
535535
raise ValueError(INVALID_MODEL_ID_ERROR_MSG.format(model_id=model_id))
536536

537+
self._specs = verify_model_region_and_return_specs(
538+
region=self.region,
539+
model_id=self.model_id,
540+
version=self.model_version,
541+
hub_arn=self.hub_arn,
542+
model_type=self.model_type,
543+
scope=JumpStartScriptScope.TRAINING,
544+
sagemaker_session=self.sagemaker_session,
545+
)
546+
537547
estimator_init_kwargs = get_init_kwargs(
538548
model_id=model_id,
539549
model_version=model_version,

src/sagemaker/jumpstart/model.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,16 @@ def _validate_model_id_and_type():
312312
if not self.model_type and not hub_arn:
313313
raise ValueError(INVALID_MODEL_ID_ERROR_MSG.format(model_id=model_id))
314314

315+
self._specs = verify_model_region_and_return_specs(
316+
region=self.region,
317+
model_id=self.model_id,
318+
version=self.model_version,
319+
hub_arn=self.hub_arn,
320+
model_type=self.model_type,
321+
scope=JumpStartScriptScope.INFERENCE,
322+
sagemaker_session=self.sagemaker_session,
323+
)
324+
315325
self._model_data_is_set = model_data is not None
316326
model_init_kwargs = get_init_kwargs(
317327
model_id=model_id,

0 commit comments

Comments
 (0)