0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MLflow Tips

Last updated at Posted at 2025-05-04

メモ

  • UI上でexperimentを削除しても、mlruns/.trash内に残ってるので、同じ名前のexperimentを再作成できない。なので、同名のexperimentを作成する際は.trash内のデータを削除する必要がある
  • 関数内でset_experiment(experiment_name)を実行すると、experiment_nameの有無に関係なく毎回同じexperiment_idが設定される。そのため存在しないexperimentでstart_runする状況が生まれエラーを出すことがある(experimentの削除を行うと)。したがって、関数外で一発set_experimentする必要がある
NG(関数内でset_experiment)
import mlflow
def func():
    mlflow.set_experiment("experiment_name") ★存在しないexperiment_idが設定されるケースが発生しうる
    with mlflow.start_run(): ここでエラー発生
        ...
OK(関数外でset_experiment)
import mlflow
mlflow.set_experiment("experiment_name")
def func():
    with mlflow.start_run():
        ...
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?