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

Apr*_*i11 4 python mlflow

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

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.
Run Code Online (Sandbox Code Playgroud)

小智 16

Mlflow 需要 DB 作为模型注册表的数据存储因此您必须使用 DB 作为后端存储和日志模型运行跟踪服务器到此跟踪服务器。使用 DB 的最简单方法是使用 SQLite。

mlflow server \
    --backend-store-uri sqlite:///mlflow.db \
    --default-artifact-root ./artifacts \
    --host 0.0.0.0
Run Code Online (Sandbox Code Playgroud)

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

mlflow.set_tracking_uri("http://localhost:5000")
Run Code Online (Sandbox Code Playgroud)

到达 http://localhost:5000 后,您可以从 UI 或代码注册已记录的模型。