MLflow:INVALID_PARAMETER_VALUE:模型注册表存储不支持 URI“./mlruns”

MLflow: INVALID_PARAMETER_VALUE: Unsupported URI './mlruns' for model registry store

我在尝试在模型注册表中注册模型时遇到此错误。有人可以帮助我吗?

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.

Mlflow 需要数据库作为模型注册表的数据存储 因此,您必须 运行 跟踪服务器,数据库为 backend-store,并将模型记录到该跟踪服务器。 使用数据库最简单的方法是使用SQLite。

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

并将MLFLOW_TRACKING_URI环境变量设置为http://localhost:5000

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

访问 http://localhost:5000 后,您可以从 UI 或代码中注册一个已记录的模型。