2

MLflow当源代码存储在公共 git 存储库中时,我测试了实验。示例命令如下所示

mlflow run  https://github.com/amesar/mlflow-fun.git#examples/hello_world \
 --experiment-id=2019 \
 -Palpha=100 -Prun_origin=GitRun -Plog_artifact=True

但是,当我提供内部(私有)git 存储库链接而不是公共时,MLflow 会重定向到登录 url,然后执行会像这样失败。

git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v origin
stderr: 'fatal: unable to update url base from redirection:
asked for: https://gitlab-master.companyname.com/myusername/project_name
/tree/master/models/myclassifier/info/refs?service=git-upload-pack
redirect: https://gitlab-master.company.com/users/sign_in'

有什么方法可以将 git 帐户的凭据传递给 MLflow?

4

1 回答 1

2

您必须提供个人访问令牌作为 url 的一部分:

mlflow run https://<YOUR_ACCESS_TOKEN>@github.com/amesar/mlflow-fun.git#examples/hello_world

您可以在此处生成令牌:https ://github.com/settings/tokens

于 2019-09-11T09:52:53.817 回答