Friday, 3 February 2023

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:

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:

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?



from MLFlow - Experiment tracking - No such file or directory

No comments:

Post a Comment