Register model from Azure Machine Learning run without downloading to local file

Viewed 1141

A model was trained on a remote compute using azureml.core Experiment as follows:

experiment = Experiment(ws, name=experiment_name)
src = ScriptRunConfig(<...>)
run = experiment.submit(src)
run.wait_for_completion(show_output=True)

How can a model trained in this run be registered with Azure Machine Learning workspace without being downloaded to a local file first?

1 Answers

The model can be registered using register_model method available on the run object (click the link for documentation).

Example:

model = best_run.register_model(model_name='sklearn-iris', model_path='outputs/model.joblib')

The following notebook can also be used as an example for setting up training experiments and registering models obtained as a result of experiment runs.

Related