Connect a Model Registry
Table of Contents
Wallaroo users can register their trained machine learning models from a model registry into their Wallaroo instance and perform inferences with it through a Wallaroo pipeline.
The following details procedures for DevOps Engineers and MLOps Engineers creating a model or artifact registry and connect it to Wallaroo.
Registry Services Roles
Registry service use in Wallaroo typically falls under the following roles.
Role | Recommended Actions | Description |
---|---|---|
DevOps Engineer | Create Model Registry | Create the model (AKA artifact) registry service |
Retrieve Model Registry Tokens | Generate the model registry service credentials. | |
MLOps Engineer | Connect Model Registry to Wallaroo | Add the Registry Service URL and credentials into a Wallaroo instance for use by other users and scripts. |
Add Wallaroo Registry Service to Workspace | Add the registry service configuration to a Wallaroo workspace for use by workspace users. | |
Remove Registry from Workspace | Add the registry service configuration to a Wallaroo workspace for use by workspace users. |
Model Registry Operations
The following links to guides and information on setting up a model registry (also known as an artifact registry).
Create Model Registry
See Model serving with Azure Databricks for setting up a model registry service using Azure Databricks.
The following steps create an Access Token used to authenticate to an Azure Databricks Model Registry.
- Log into the Azure Databricks workspace.
- From the upper right corner access the User Settings.
- From the Access tokens, select Generate new token.
- Specify any token description and lifetime. Once complete, select Generate.
- Copy the token and store in a secure place. Once the Generate New Token module is closed, the token will not be retrievable.
The MLflow Model Registry provides a method of setting up a model registry service. Full details can be found at the MLflow Registry Guides.
A generic MLFlow model registry requires no token.
Wallaroo Registry Operations
- Connect Model Registry to Wallaroo: This details the link and connection information to a existing MLFlow registry service. Note that this does not create a MLFlow registry service, but adds the connection and credentials to Wallaroo to allow that MLFlow registry service to be used by other entities in the Wallaroo instance.
As of this time, Wallaroo only supports MLFlow Registry version 1.30, and only supports deploying model artifacts that meet the Wallaroo model versions.
Connect Model Registry to Wallaroo
Registry connection information is added to a Wallaroo instance through the Wallaroo.Client.create_model_registry
method.
Connect Model Registry to Wallaroo Parameters
Parameter | Type | Description |
---|---|---|
name | string (Required) | The name of the MLFlow Registry service. |
token | string (Required) | The authentication token used to authenticate to the MLFlow Registry. |
url | string (Required) | The URL of the MLFlow registry service. |
Connect Model Registry to Wallaroo Return
The following is returned when a MLFlow Registry is successfully created.
Field | Type | Description |
---|---|---|
Name | String | The name of the MLFlow Registry service. |
URL | string | The URL for connecting to the service. |
Workspaces | List[string] | The name of all workspaces this registry was added to. |
Created At | DateTime | When the registry was added to the Wallaroo instance. |
Updated At | DateTime | When the registry was last updated. |
Note that the token
is not displayed for security reasons.
Connect Model Registry to Wallaroo Example
The following example creates a Wallaroo MLFlow Registry with the name ExampleNotebook
stored in a sample Azure DataBricks environment.
wl.create_model_registry(name="ExampleNotebook",
token="abcdefg-3",
url="https://abcd-123489.456.azuredatabricks.net")
Field | Value |
---|---|
Name | ExampleNotebook |
URL | https://abcd-123489.456.azuredatabricks.net |
Workspaces | sample.user@wallaroo.ai - Default Workspace |
Created At | 2023-27-Jun 13:57:26 |
Updated At | 2023-27-Jun 13:57:26 |
Add Registry to Workspace
Registries are assigned to a Wallaroo workspace with the Wallaroo.registry.add_registry_to_workspace
method. This allows members of the workspace to access the registry connection. A registry can be associated with one or more workspaces.
Add Registry to Workspace Parameters
Parameter | Type | Description |
---|---|---|
name | string (Required) | The numerical identifier of the workspace. |
Add Registry to Workspace Returns
The following is returned when a MLFlow Registry is successfully added to a workspace.
Field | Type | Description |
---|---|---|
Name | String | The name of the MLFlow Registry service. |
URL | string | The URL for connecting to the service. |
Workspaces | List[string] | The name of all workspaces this registry was added to. |
Created At | DateTime | When the registry was added to the Wallaroo instance. |
Updated At | DateTime | When the registry was last updated. |
Example
registry.add_registry_to_workspace(workspace_id=workspace_id)
Field | Value |
---|---|
Name | ExampleNotebook |
URL | https://abcd-123489.456.azuredatabricks.net |
Workspaces | sample.user@wallaroo.ai - Default Workspace |
Created At | 2023-27-Jun 13:57:26 |
Updated At | 2023-27-Jun 13:57:26 |
Remove Registry from Workspace
Registries are removed from a Wallaroo workspace with the Registry remove_registry_from_workspace
method.
Remove Registry from Workspace Parameters
Parameter | Type | Description |
---|---|---|
workspace_id | Integer (Required) | The numerical identifier of the workspace. |
Remove Registry from Workspace Return
Field | Type | Description |
---|---|---|
Name | String | The name of the MLFlow Registry service. |
URL | string | The URL for connecting to the service. |
Workspaces | List[String] | A list of workspaces by name that still contain the registry. |
Created At | DateTime | When the registry was added to the Wallaroo instance. |
Updated At | DateTime | When the registry was last updated. |
Remove Registry from Workspace Example
registry.remove_registry_from_workspace(workspace_id=workspace_id)
Field | Value |
---|---|
Name | JeffRegistry45 |
URL | https://sample.registry.azuredatabricks.net |
Workspaces | john.hummel@wallaroo.ai - Default Workspace |
Created At | 2023-17-Jul 17:56:52 |
Updated At | 2023-17-Jul 17:56:52 |