Skip to content

Commit

Permalink
Update gen_result.py to set tracking URI dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
mijanr committed Mar 16, 2024
1 parent 90b8418 commit 9802958
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions results/gen_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
"""

import mlflow
import git

def get_best_runs():
basePath = git.Repo('.', search_parent_directories=True).working_tree_dir
mlflow.set_tracking_uri(f"file:{basePath}/mlruns")

mlflow.set_tracking_uri("file:../mlruns")
def get_best_runs():

all_runs = mlflow.search_runs(search_all_experiments=True)
columns = ['tags.mlflow.runName', 'params.model_name', 'metrics.accuracy']
all_runs = all_runs[columns]
Expand Down

0 comments on commit 9802958

Please sign in to comment.