Adi Unnithan
Adi Unnithan

Reputation: 303

Copying models between workspaces

I am setting up deployment pipelines for our models and I wanted to support this scenario:

  1. User registers model in test AML workspace in test subscription, checks in deployment code/configs that references the model version (there is a requirements.txt-like file that specifies the model ID - name and version)
  2. Azure DevOps CI is triggered after code checkin to run az ml model deploy to a test environment.
  3. User decides after that endpoint works well, wants to deploy to prod. In Azure DevOps, manually invokes a prod pipeline that will use the same checked-in code/configs (with the same referenced model):
    • copy the model from the test AML workspace to a new registered model in the prod AML workspace in a different subscription, with the same version
    • run az ml model deploy with different variables corresponding to the prod env, but using the same checked-in AML code/configs

I've looked at the MLOps references but can't seem to figure out how to support step 3 in the above scenario.

I thought I could do an az ml model download to download the model from the test env and register it in the prod env. The registration process automatically sets the version number so, e.g. the config that references myModel:12 is no longer valid since in prod the ID is myModel:1

How can I copy the model from one workspace in one subscription to another and preserve the ID?

Upvotes: 2

Views: 1532

Answers (1)

Roope Astala - MSFT
Roope Astala - MSFT

Reputation: 756

You could use model tags to set up your own identifiers that are shared across workspace, and query models with specific tags:

az ml model update --add-tag
az ml model list --tag

Upvotes: 1

Related Questions