@@ -1285,6 +1285,7 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
1285
1285
Args:
1286
1286
json_obj (Dict[str, Any]): Dictionary representation of spec.
1287
1287
"""
1288
+ print ("HEYHEYHEY" )
1288
1289
if self ._is_hub_content :
1289
1290
json_obj = walk_and_apply_json (json_obj , camel_to_snake )
1290
1291
self .model_id : str = json_obj .get ("model_id" )
@@ -1361,6 +1362,7 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
1361
1362
)
1362
1363
self .model_kwargs = deepcopy (json_obj .get ("model_kwargs" , {}))
1363
1364
self .deploy_kwargs = deepcopy (json_obj .get ("deploy_kwargs" , {}))
1365
+ print (f'HUH { json_obj .get ("predictor_specs" )} ' )
1364
1366
self .predictor_specs : Optional [JumpStartPredictorSpecs ] = (
1365
1367
JumpStartPredictorSpecs (
1366
1368
json_obj .get ("predictor_specs" ),
@@ -1535,11 +1537,11 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
1535
1537
for field in json_obj .keys ():
1536
1538
if field in self .__slots__ :
1537
1539
setattr (self , field , json_obj [field ])
1538
-
1540
+
1539
1541
# Handle custom fields
1540
- for field , custom_field in self .CUSTOM_FIELD_MAP .items ():
1542
+ for custom_field , field in self .CUSTOM_FIELD_MAP .items ():
1541
1543
if field in json_obj :
1542
- setattr (self , custom_field , json_obj [field ])
1544
+ setattr (self , field , json_obj [custom_field ])
1543
1545
1544
1546
1545
1547
class JumpStartMetadataConfig (JumpStartDataHolderType ):
@@ -1732,7 +1734,9 @@ def __init__(self, spec: Dict[str, Any], is_hub_content: Optional[bool] = False)
1732
1734
spec (Dict[str, Any]): Dictionary representation of spec.
1733
1735
is_hub_content (Optional[bool]): Whether the model is from a private hub.
1734
1736
"""
1737
+ print ("here?" )
1735
1738
super ().__init__ (spec , is_hub_content )
1739
+ print ("hi" )
1736
1740
self .from_json (spec )
1737
1741
if self .inference_configs and self .inference_configs .get_top_config_from_ranking ():
1738
1742
super ().from_json (self .inference_configs .get_top_config_from_ranking ().resolved_config )
0 commit comments