10

I got this error when I was trying to have a model registered in the model registry. Could someone help me?

RestException: INVALID_PARAMETER_VALUE: Unsupported URI './mlruns' for model registry store. 
Supported schemes are: ['postgresql', 'mysql', 'sqlite', 'mssql']. 
See https://www.mlflow.org/docs/latest/tracking.html#storage for how to setup a compatible server.
desertnaut
  • 57,590
  • 26
  • 140
  • 166
Aprilcui11
  • 125
  • 1
  • 1
  • 5

1 Answers1

31

Mlflow required DB as datastore for Model Registry So you have to run tracking server with DB as backend-store and log model to this tracking server. The easiest way to use DB is to use SQLite.

mlflow server \
    --backend-store-uri sqlite:///mlflow.db \
    --default-artifact-root ./artifacts \
    --host 0.0.0.0

And set MLFLOW_TRACKING_URI environment variable to http://localhost:5000 or

mlflow.set_tracking_uri("http://localhost:5000")

After got to http://localhost:5000 and you can register a logged model from UI or from the code.

Sergey Pryvala
  • 506
  • 4
  • 6
  • My experiments disappeared after adding a backend-store-uri. Is there a way to keep them? – Fernando Wittmann May 07 '22 at 06:54
  • 1
    ```mlflow server \ --backend-store-uri sqlite:///mlflow.db \ --default-artifact-root ./mlruns \ --host 0.0.0.0 ``` Use this command. Since default artifact location for mlflow is ./mlruns. @FernandoWittmann – Parth chokhra May 08 '22 at 06:48
  • 1
    @Parthchokhra right. Now you are using another mlflow backend not your default – Sergey Pryvala May 09 '22 at 07:29
  • @Parthchokhra thanks! but unfortunately, that doesn't work when using an S3 path as artifact-root. Posted more details in [this SO question](https://stackoverflow.com/questions/72150148/experiments-disappear-when-adding-backend-store-uri). – Fernando Wittmann May 11 '22 at 06:02
  • 1
    @Parthchokhra it is working. Check out this [link](https://www.mlflow.org/docs/latest/tracking.html#scenario-4-mlflow-with-remote-tracking-server-backend-and-artifact-stores) – Sergey Pryvala May 16 '22 at 07:39