sagemaker.core.jumpstart.hub.parsers#
This module stores Hub converter utilities for JumpStart.
Functions
|
Returns a list of arg keys for a specific model spec arg type. |
Returns a map of arg type to arg keys for a given hub content document. |
|
Sets fields in JumpStartModelSpecs based on values in DescribeHubContentResponse |
- sagemaker.core.jumpstart.hub.parsers.get_model_spec_arg_keys(arg_type: ModelSpecKwargType, naming_convention: NamingConventionType = NamingConventionType.UPPER_CAMEL_CASE) List[str][source]#
Returns a list of arg keys for a specific model spec arg type.
- Parameters:
arg_type (ModelSpecKwargType) – Type of the model spec’s kwarg.
naming_convention (NamingConventionType) – Type of naming convention to return.
- Raises:
ValueError – If the naming convention is not valid.
- sagemaker.core.jumpstart.hub.parsers.get_model_spec_kwargs_from_hub_model_document(arg_type: ModelSpecKwargType, hub_content_document: Dict[str, Any], naming_convention: NamingConventionType = NamingConventionType.UPPER_CAMEL_CASE) Dict[str, Any][source]#
Returns a map of arg type to arg keys for a given hub content document.
- Parameters:
arg_type (ModelSpecKwargType) – Type of the model spec’s kwarg.
hub_content_document – A dictionary representation of hub content document.
naming_convention (NamingConventionType) – Type of naming convention to return.
- sagemaker.core.jumpstart.hub.parsers.make_model_specs_from_describe_hub_content_response(response: DescribeHubContentResponse) JumpStartModelSpecs[source]#
Sets fields in JumpStartModelSpecs based on values in DescribeHubContentResponse
- Parameters:
response (Dict[str, any]) – parsed DescribeHubContentResponse returned from SageMaker:DescribeHubContent