Skip to content

Commit 344f5e0

Browse files
author
Malav Shastri
committed
fix: simplify the approach to get the config components
1 parent 25729ab commit 344f5e0

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/sagemaker/jumpstart/types.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,18 +1748,10 @@ def from_json(self, json_obj: Dict[str, Any]) -> None:
17481748
alias,
17491749
config,
17501750
json_obj,
1751-
(
1752-
{
1753-
component_name: self.inference_config_components.get(component_name)
1754-
for component_name in config.get("component_names")
1755-
}
1756-
if config and config.get("component_names")
1757-
else None
1758-
),
1751+
config.config_components,
17591752
is_hub_content=self._is_hub_content,
17601753
)
1761-
for alias, config in json_obj["inference_configs"].items()
1762-
if alias != "scope"
1754+
for alias, config in json_obj["inference_configs"]["configs"].items()
17631755
}
17641756
if json_obj.get("inference_configs")
17651757
else None

0 commit comments

Comments
 (0)