Skip to content

chore: expose raw spec json #4782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/sagemaker/jumpstart/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,9 +1258,10 @@ class JumpStartMetadataBaseFields(JumpStartDataHolderType):
"hosting_neuron_model_version",
"hub_content_type",
"_is_hub_content",
"_raw_json",
]

_non_serializable_slots = ["_is_hub_content"]
_non_serializable_slots = ["_is_hub_content", "_raw_json"]

def __init__(self, fields: Dict[str, Any], is_hub_content: Optional[bool] = False):
"""Initializes a JumpStartMetadataFields object.
Expand All @@ -1269,6 +1270,7 @@ def __init__(self, fields: Dict[str, Any], is_hub_content: Optional[bool] = Fals
fields (Dict[str, Any]): Dictionary representation of metadata fields.
"""
self._is_hub_content = is_hub_content
self._raw_json = fields
self.from_json(fields)

def from_json(self, json_obj: Dict[str, Any]) -> None:
Expand Down
Loading