You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Some operations may be executed directly using the MLflow fluent API (`mlflow.<method>`). However, others may require to create an MLflow client, which allows to communicate with Azure Machine Learning in the MLflow protocol. You can create an `MlflowClient` object as follows. This tutorial will use the object `client` to refer to such MLflow client.
> Models can only be registered to the registry in the same workspace where the run was tracked. Cross-workspace operations are not supported by the moment in Azure Machine Learning.
35
43
44
+
> [!TIP]
45
+
> We recommend to register models from runs or using the method `mlflow.<flavor>.log_model` from inside the run as it keeps lineage from the job that generated the asset.
46
+
36
47
### Creating models from assets
37
48
38
49
If you have a folder with an MLModel MLflow model, then you can register it directly. There's no need for the model to be always in the context of a run. To do that you can use the URI schema `file://path/to/model` to register MLflow models stored in the local file system. Let's create a simple model using `Scikit-Learn` and save it in MLflow format in the local storage:
> Notice how the model URI schema `file:/` requires absolute paths.
63
-
64
72
## Querying model registries
65
73
66
74
### Querying all the models in the registry
67
75
68
-
You can query all the registered models in the registry using the MLflow client with the method `list_registered_models`. The MLflow client is required to do all these operations.
69
-
70
-
```python
71
-
using mlflow
72
-
73
-
client = mlflow.tracking.MlflowClient()
74
-
```
75
-
76
-
The following sample prints all the model's names:
76
+
You can query all the registered models in the registry using the MLflow client. The following sample prints all the model's names:
0 commit comments