--- title: "wallaroo.model_registry" type: docs linkTitle: "wallaroo.model_registry" ---
class ModelRegistry(wallaroo.object.Object):

An instance of an external Model Registry. Currently, the supported registries are: DataBricks

ModelRegistry(client: wallaroo.client.Client, data: Dict[str, Any])

Base constructor.

Each object requires:

- a GraphQL client - in order to fill its missing members dynamically
- an initial data blob - typically from unserialized JSON, contains at
- least the data for required members (typically the object's primary key) and optionally other data members.

def name(*args, **kwargs):
def id(*args, **kwargs):
def url(*args, **kwargs):
def created_at(*args, **kwargs):
def updated_at(*args, **kwargs):
def workspaces(*args, **kwargs):
def add_registry_to_workspace(self, workspace_id: int):
def remove_registry_from_workspace(self, workspace_id: int):
def list_models(self):
def upload_model( self, name: str, path: str, framework: wallaroo.framework.Framework, input_schema: pyarrow.lib.Schema, output_schema: pyarrow.lib.Schema, requirements: List[str] = []) -> wallaroo.model.Model:

###### Parameters

- name str A descriptive name to set
- path str The DBFS path to the artifact file to upload.
- framework Framework The ML framework that this model uses (ex. Framework.ONNX).
- requirements List[str] An optional list of python requirements needed to run this model.
- input_schema pa.Schema A PyArrow schema describing inputs to this model.
- output_schema pa.Schema A PyArrow schema describing the outputs of this model.

###### Returns

> Model An instance of the Wallaroo model that is being created.

class ModelRegistriesList(typing.List[wallaroo.model_registry.ModelRegistry]):

Wraps a list of Model Registries for display in a display-aware environment like Jupyter.

##### Inherited Members

builtins.list
  list
  clear
  copy
  append
  insert
  extend
  pop
  remove
  index
  count
  reverse
  sort

class RegisteredModelVersion(wallaroo.wallaroo_ml_ops_api_client.models.registered_model_version.RegisteredModelVersion):

An MLFlow version of a [RegisteredModel]. Versions start at 1.

Attributes: creation_timestamp (int): Timestamp in milliseconds from epoch current_stage (str): last_updated_timestamp (int): Timestamp in milliseconds from epoch name (str): run_id (str): source (str): status (str): version (str): description (Union[Unset, None, str]): run_link (Union[Unset, None, str]): user_id (Union[Unset, None, str]):

RegisteredModelVersion( client: wallaroo.client.Client, data: wallaroo.wallaroo_ml_ops_api_client.models.registered_model_version.RegisteredModelVersion, registry_id: str)

Method generated by attrs for class RegisteredModelVersion.

updated_at

def upload(self, framework: Framework, requirements: List[str] = []): # Uploads this Model's source code to your Wallaroo instance.

    #:param: framework Framework The ML framework that this model uses (ex. Framework.ONNX).
    #:param: requirements List[str] An optional list of python requirements needed to run this model.
    #:return: Model An instance of the Wallaroo model that is being created.
    #
    from .wallaroo_ml_ops_api_client.api.model.upload_from_registry import sync
    from .wallaroo_ml_ops_api_client.models.upload_from_registry_request import (
        UploadFromRegistryRequest,
    )
    from .wallaroo_ml_ops_api_client.models.conversion import Conversion

    ret = sync(
        client=self._client.mlops(),
        json_body=UploadFromRegistryRequest(
            Conversion(
                framework=framework._to_openapi_framework(),
                requirements=requirements,
            ),
            self.name,
            self.registry_id,
            self.version,
            "private",
            self._client.get_current_workspace()._id,
        ),
    )

    if ret is None:
        raise Exception("Failed to start upload.")

    return Model(client=self._client, data={"id": ret.model_id})

def list_artifacts(self):

##### Inherited Members

wallaroo.wallaroo_ml_ops_api_client.models.registered_model_version.RegisteredModelVersion
  to_dict
  from_dict
  additional_keys

class DbfsFileList(typing.List[wallaroo.wallaroo_ml_ops_api_client.models.dbfs_list_response_file_with_full_path.DbfsListResponseFileWithFullPath]):

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

##### Inherited Members

builtins.list
  list
  clear
  copy
  append
  insert
  extend
  pop
  remove
  index
  count
  reverse
  sort

class RegisteredModelVersionsList(typing.List[wallaroo.model_registry.RegisteredModelVersion]):

Wraps a list of Model Registries for display in a display-aware environment like Jupyter.

##### Inherited Members

builtins.list
  list
  clear
  copy
  append
  insert
  extend
  pop
  remove
  index
  count
  reverse
  sort

class RegisteredModel:

This is a reference to a Registered Model in an external registry.

RegisteredModel( client: wallaroo.client.Client, data: wallaroo.wallaroo_ml_ops_api_client.models.registered_model.RegisteredModel, registry_id: str)
def versions(self):
def list_artifacts(self):
class RegisteredModels(typing.List[wallaroo.model_registry.RegisteredModel]):

This is a list of Registered Models in an external registry.

##### Inherited Members

builtins.list
  list
  clear
  copy
  append
  insert
  extend
  pop
  remove
  index
  count
  reverse
  sort