【问题标题】:mlflow artifact storage to AWS s3 artifactsmlflow 工件存储到 AWS s3 工件
【发布时间】:2020-02-25 15:57:16
【问题描述】:

是否有将 mlflow 存储的日志存储到 AWS S3 的方法?

mlflow server \
    --backend-store-uri /mnt/persistent-disk \
    --default-artifact-root s3://my-mlflow-bucket/ \
    --host 0.0.0.0

是否可以只提供 default-artifact-root 而不是同时提供 backend-store-uri 和 default-artifact-root?

还有没有办法从 MlFlowClient 或 MlFlowContext 以编程方式设置 default-artifact-root 而不是运行 mlflow 服务器命令行?

仅供参考,我已经在我的环境变量中定义了所有 AWS_ACCESS_KEY 和 AWS_SECRET_KEY,并将 ENDPOINTS 导出到 S3。

ActiveRun 类中的 logArtifacts 是设置指向 AWS s3 存储桶的 artifact_uri 的正确方法吗?

【问题讨论】:

    标签: amazon-s3 mlflow


    【解决方案1】:

    但是,您只能以编程方式为客户端 set tracking URI 将实验记录到远程启动的服务器。如果您使用与 SQLAlchemy 兼容的数据库进行存储,则需要这两个参数。

    例如,在我使用 sqlite://mlruns.db 的本地主机上,我可以将服务器启动为:

    mlflow server --backend-store-uri sqlite:///mlruns.db --default-artifact-root ./mlruns 
    
    [2020-03-07 23:06:42 -0800] [3698] [INFO] Starting gunicorn 20.0.4
    [2020-03-07 23:06:42 -0800] [3698] [INFO] Listening at: http://127.0.0.1:5000 (3698)
    [2020-03-07 23:06:42 -0800] [3698] [INFO] Using worker: sync
    [2020-03-07 23:06:42 -0800] [3701] [INFO] Booting worker with pid: 3701
    [2020-03-07 23:06:42 -0800] [3702] [INFO] Booting worker with pid: 3702
    [2020-03-07 23:06:42 -0800] [3703] [INFO] Booting worker with pid: 3703
    [2020-03-07 23:06:42 -0800] [3704] [INFO] Booting worker with pid: 3704
    

    附带说明,如果出于任何原因您计划运行多个跟踪服务器,例如多个数据科学团队正在使用 MLflow,以及其各自的后端存储 uri 和 default-artifact-root,则可能使用一个外壳脚本 包装器,您可以在其中从配置文件中读取相应的参数。

    my_script -f ds_team1.config
    my_script -f ds_team2.config
    

    team.config 将具有相应的凭据、端口、mlflow 服务器的参数。

    最后,mlflow.log_artifact() 是您要记录的工件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-02
      • 2020-09-04
      • 1970-01-01
      • 2022-07-29
      • 2020-03-18
      • 2021-03-16
      相关资源
      最近更新 更多