使用MLFlow和Sklearn记录模型时多个伪影路径

发布于 2025-02-09 07:39:52 字数 609 浏览 1 评论 0原文

我正在使用MLFlow来记录logistic回归的参数和工件,但是当我尝试记录模型时,我可以在mlflow UI中看到所有文件时,我会看到两个文件夹:一个文件夹:一个名为“模型”,另一个名为命名的文件夹“ logger”(我设置的那个)。

model = LogisticRegression()

mlflow.set_tracking_uri('file:///artifacts')
mlflow.set_experiment('test')
mlflow.autolog()

with mlflow.start_run(run_name=run_name) as run:
   model.train(X_train, y_train)
   mlflow.sklearn.log_model(model, 'logreg')

不确定我是否缺少某些东西或是否有配置。

希望有人可以帮助我!

I'm using mlflow to log parameters and artifacts of a Logistic Regression, but when I try to log the model so I can see all the files in the Mlflow UI, I see two folders: one named 'model' and the other one named 'logger' (the one I set).

model = LogisticRegression()

mlflow.set_tracking_uri('file:///artifacts')
mlflow.set_experiment('test')
mlflow.autolog()

with mlflow.start_run(run_name=run_name) as run:
   model.train(X_train, y_train)
   mlflow.sklearn.log_model(model, 'logreg')

enter image description here

Not sure if I'm missing something or if there's a configuration for that.

I hope someone out there can help me!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光与爱终年不遇 2025-02-16 07:39:52

您已经设置了自动,并且还明确记录了模型。删除一个,然后尝试。

You have set autolog and you are also logging the model explicitly. Remove one and then try.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文