Skip to content

Model Bundles

CloudpickleArtifactFlavor

Bases: BaseModel

app_config instance-attribute

app_config: Optional[Dict[str, Any]]

Optional configuration for the application.

framework class-attribute instance-attribute

framework: Union[PytorchFramework, TensorflowFramework, CustomFramework] = Field(..., discriminator='framework_type')

Machine Learning framework specification. Either PytorchFramework, TensorflowFramework, or CustomFramework.

load_model_fn instance-attribute

load_model_fn: str

Function which, when called, returns the model object.

load_predict_fn instance-attribute

load_predict_fn: str

Function which, when called, returns the prediction function.

requirements instance-attribute

requirements: List[str]

List of requirements to install in the environment before running the model.

CreateModelBundleV2Response

Bases: BaseModel

Response object for creating a Model Bundle.

model_bundle_id instance-attribute

model_bundle_id: str

ID of the Model Bundle.

CustomFramework

Bases: BaseModel

image_repository instance-attribute

image_repository: str

Docker image repository to use as the base image.

image_tag instance-attribute

image_tag: str

Docker image tag to use as the base image.

ListModelBundlesV2Response

Bases: BaseModel

Response object for listing Model Bundles.

model_bundles instance-attribute

model_bundles: List[ModelBundleV2Response]

A list of Model Bundles.

ModelBundle dataclass

Represents a ModelBundle.

app_config class-attribute instance-attribute

app_config: Optional[Dict[Any, Any]] = None

An optional user-specified configuration mapping for the bundle.

env_params class-attribute instance-attribute

env_params: Optional[Dict[str, str]] = None

A dictionary that dictates environment information. See LaunchClient.create_model_bundle for more information.

id class-attribute instance-attribute

id: Optional[str] = None

A globally unique identifier for the bundle.

location class-attribute instance-attribute

location: Optional[str] = None

An opaque location for the bundle.

metadata class-attribute instance-attribute

metadata: Optional[Dict[Any, Any]] = None

Arbitrary metadata for the bundle.

name instance-attribute

name: str

The name of the bundle. Must be unique across all bundles that the user owns.

packaging_type class-attribute instance-attribute

packaging_type: Optional[str] = None

The packaging type for the bundle. Can be cloudpickle or zip.

requirements class-attribute instance-attribute

requirements: Optional[List[str]] = None

A list of Python package requirements for the bundle. See LaunchClient.create_model_bundle for more information.

ModelBundleV2Response

Bases: BaseModel

Response object for a single Model Bundle.

created_at instance-attribute

created_at: datetime.datetime

Timestamp of when the Model Bundle was created.

flavor class-attribute instance-attribute

flavor: ModelBundleFlavors = Field(..., discriminator='flavor')

Flavor of the Model Bundle, representing how the model bundle was packaged.

See ModelBundleFlavors for details.

id instance-attribute

id: str

ID of the Model Bundle.

metadata instance-attribute

metadata: Dict[str, Any]

Metadata associated with the Model Bundle.

model_artifact_ids instance-attribute

model_artifact_ids: List[str]

IDs of the Model Artifacts associated with the Model Bundle.

name instance-attribute

name: str

Name of the Model Bundle.

PytorchFramework

Bases: BaseModel

pytorch_image_tag instance-attribute

pytorch_image_tag: str

Image tag of the Pytorch image to use.

RunnableImageFlavor

Bases: RunnableImageLike

Model bundles that use custom docker images that expose an HTTP server for inference.

TensorflowFramework

Bases: BaseModel

tensorflow_version instance-attribute

tensorflow_version: str

Tensorflow version to use.

ZipArtifactFlavor

Bases: BaseModel

app_config class-attribute instance-attribute

app_config: Optional[Dict[str, Any]] = None

Optional configuration for the application.

framework class-attribute instance-attribute

framework: Union[PytorchFramework, TensorflowFramework, CustomFramework] = Field(..., discriminator='framework_type')

Machine Learning framework specification. Either PytorchFramework, TensorflowFramework, or CustomFramework.

load_model_fn_module_path instance-attribute

load_model_fn_module_path: str

Path to the module to load the model object.

load_predict_fn_module_path instance-attribute

load_predict_fn_module_path: str

Path to the module to load the prediction function.

requirements instance-attribute

requirements: List[str]

List of requirements to install in the environment before running the model.