@@ -1363,10 +1363,10 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
1363
1363
self .deploy_kwargs = deepcopy (json_obj .get ("deploy_kwargs" , {}))
1364
1364
self .predictor_specs : Optional [JumpStartPredictorSpecs ] = (
1365
1365
JumpStartPredictorSpecs (
1366
- json_obj .get ("sage_maker_sdk_predictor_specifications " ),
1366
+ json_obj .get ("predictor_specs " ),
1367
1367
is_hub_content = self ._is_hub_content ,
1368
1368
)
1369
- if json_obj .get ("sage_maker_sdk_predictor_specifications " )
1369
+ if json_obj .get ("predictor_specs " )
1370
1370
else None
1371
1371
)
1372
1372
self .default_payloads : Optional [Dict [str , JumpStartSerializablePayload ]] = (
@@ -1502,6 +1502,9 @@ class JumpStartConfigComponent(JumpStartMetadataBaseFields):
1502
1502
"incremental_training_supported" ,
1503
1503
]
1504
1504
1505
+ # Map of HubContent fields that map to custom names in MetadataBaseFields
1506
+ CUSTOM_FIELD_MAP = {"sage_maker_sdk_predictor_specifications" : "predictor_specs" }
1507
+
1505
1508
__slots__ = slots + JumpStartMetadataBaseFields .__slots__
1506
1509
1507
1510
def __init__ (
@@ -1532,6 +1535,11 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
1532
1535
for field in json_obj .keys ():
1533
1536
if field in self .__slots__ :
1534
1537
setattr (self , field , json_obj [field ])
1538
+
1539
+ # Handle custom fields
1540
+ for field , custom_field in self .CUSTOM_FIELD_MAP .items ():
1541
+ if field in json_obj :
1542
+ setattr (self , custom_field , json_obj [field ])
1535
1543
1536
1544
1537
1545
class JumpStartMetadataConfig (JumpStartDataHolderType ):
0 commit comments