Light Logo
Python SDK (v0.16.0)Reference

model_versions

Model Versions module.

model_versions module

Model Versions module.

class CreateModelVersionParams

Bases: TypedDict

Parameters for creating a version of a model.

  • Variables:
    • release_notes (str) – Information about changes such as new features, bug fixes, or optimizations in this model version.
    • schemas (Schemas) – Schemas for the model version.
    • container_image_digest (str) – SHA256 hash digest of the model version’s container image.

release_notes : str

schemas : Schemas

container_image_digest : str

class ModelVersions(api)

Bases: Resource

Initializes the Resource with an API instance.

  • Parameters: api (API) – An instance of the API class.

get(model_owner, model_name, number)

Get a model version.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • number (int) – The number of the model version.
  • Returns: The model version.
  • Return type: ModelVersionWithDetails

async async_get(model_owner, model_name, number)

Get a model version.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • number (int) – The number of the model version.
  • Returns: The model version.
  • Return type: ModelVersionWithDetails

list(model_owner, model_name, pagination_options=None)

List model versions.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • pagination_options (Optional [PaginationOptions ]) – Optional settings to control pagination behavior.
  • Returns: Paginated response containing model : versions and navigation metadata.
  • Return type: PaginatedResponse[ModelVersion]

async async_list(model_owner, model_name, pagination_options=None)

List model versions.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • pagination_options (Optional [PaginationOptions ]) – Optional settings to control pagination behavior.
  • Returns: Paginated response containing model : versions and navigation metadata.
  • Return type: PaginatedResponse[ModelVersion]

delete(model_owner, model_name, number)

Delete a model version.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • number (int) – The number of the model version.
  • Return type: None

async async_delete(model_owner, model_name, number)

Delete a model version.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • number (int) – The number of the model version.
  • Return type: None

create(model_owner, model_name, options)

Create a version of a model.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • options (CreateModelVersionParams) – Model’s version creation parameters.
  • Returns: The new model version.
  • Return type: ModelVersionWithDetails

async async_create(model_owner, model_name, options)

Create a version of a model.

  • Parameters:
    • model_owner (str) – Username of the model’s owner.
    • model_name (str) – Name of the model.
    • options (CreateModelVersionParams) – Model’s version creation parameters.
  • Returns: The new model version.
  • Return type: ModelVersionWithDetails