sagemaker.core.jumpstart.hub.hub#

This module provides the JumpStart Hub class.

Classes

Hub(hub_name, sagemaker_session[, bucket_name])

Class for creating and managing a curated JumpStart hub

class sagemaker.core.jumpstart.hub.hub.Hub(hub_name: str, sagemaker_session: Session, bucket_name: str | None = None)[source]#

Bases: object

Class for creating and managing a curated JumpStart hub

LOGGER = <Logger sagemaker (INFO)>#
create(description: str, display_name: str | None = None, search_keywords: str | None = None, tags: str | None = None) Dict[str, str][source]#

Creates a hub with the given description

create_model_reference(model_arn: str, model_name: str | None = None, min_version: str | None = None)[source]#

Adds model reference to this SageMaker Hub.

delete() None[source]#

Deletes this SageMaker Hub.

delete_model_reference(model_name: str) None[source]#

Deletes model reference from this SageMaker Hub.

describe(hub_name: str | None = None) DescribeHubResponse[source]#

Returns descriptive information about the Hub

describe_model(model_name: str, hub_name: str | None = None, model_version: str | None = None) DescribeHubContentResponse[source]#

Describe Model or ModelReference in a Hub.

list_models(clear_cache: bool = True, **kwargs) Dict[str, Any][source]#

Lists the models and model references in this SageMaker Hub.

This function caches the models in local memory

**kwargs: Passed to invocation of Session:list_hub_contents.

list_sagemaker_public_hub_models(filter: ~sagemaker.core.jumpstart.filters.Operator | str = <sagemaker.core.jumpstart.filters.Constant object>, next_token: str | None = None) Dict[str, Any][source]#

Lists the models and model arns from AmazonSageMakerJumpStart Public Hub.

Args: filter (Union[Operator, str]): Optional. The filter to apply to list models. This can be

either an Operator type filter (e.g. And("task == ic", "framework == pytorch")), or simply a string filter which will get serialized into an Identity filter. (e.g. "task == ic"). If this argument is not supplied, all models will be listed. (Default: Constant(BooleanValues.TRUE)).

next_token (str): Optional. A token to resume pagination of list_inference_components.

This is currently not implemented.

logger = <Logger sagemaker (INFO)>#