简体   繁体   English

MLFlow - 实验跟踪 - 没有这样的文件或目录

[英]MLFlow - Experiment tracking - No such file or directory

I want to run experiment tracking on my jupyter notebooks, I've installed mlflow and have set it up as such:我想在我的 jupyter 笔记本上运行实验跟踪,我已经安装了 mlflow 并将其设置为:

Path("mlruns").mkdir(parents=True, exist_ok=True)
mlflow.set_tracking_uri("file:mlruns")

client = mlflow.MlflowClient()
experiment_id = client.create_experiment(
    EXPERIMENT_NAME,
    tags={
        "author": "me",
    }
)
experiment = client.get_experiment(experiment_id)

Now I want to track it, so I create a plot and run as follows:现在我想跟踪它,所以我创建了一个 plot 并运行如下:

with mlflow.start_run(
        experiment_id=experiment_id, 
        run_name="foobar",
        description="Lorem Ipsum dolor sit amet"
    ) as run:

    mlflow.log_figure(fig, "figure_name.png")

but doing so gives me the following error:但这样做会给我以下错误:

FileNotFoundError: [Errno 2] No such file or directory: 
'mlruns\\<experiment_id>\\<run_id>\\tags\\mlflow.source.name'

What am I doing wrong?我究竟做错了什么? How can I set it up to track this image?我怎样才能设置它来跟踪这个图像?

The Error comes when the file does not exist so your method run and until doesn't generate an image to avoid such this annoying errors use await in python which is new by the way read this blog , I hope my answer helped you and make it to the top of stackoverflow search.当文件不存在时会出现错误,因此您的方法运行并且直到不生成图像以避免此类烦人的错误使用 await in python 顺便阅读一下这个博客,我希望我的回答对您有所帮助并成功到 stackoverflow 搜索的顶部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM