-
Notifications
You must be signed in to change notification settings - Fork 0
Add tags for preceding mlflow run ids and modelgauge run ids #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
be2a661
4533065
cc5e862
f886da1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| from pathlib import Path | ||
|
|
||
| import mlflow | ||
| import numpy as np | ||
| import pandas as pd | ||
| from sklearn import metrics | ||
|
|
||
|
|
@@ -63,7 +64,12 @@ def score( | |
| for annotator in annotators: | ||
| score = score_annotator(annotator, annotations_df, ground_truth_df) | ||
| for metric in score: | ||
| mlflow.log_metric(f"{annotator}_{metric}", score[metric]) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I forgot to add a comment in the code, so adding here for posterity: the reason we need this now (and not before) is due to a bug introduced in mlflow 3 (from a newer version of graphql). We can track it here: mlflow/mlflow#16555 Basically if we try to log a nan or inf, it works on the mlflow side with no errors, but the gui crashes. |
||
| if np.isnan(score[metric]): | ||
| mlflow.log_metric(f"{annotator}_{metric}_is_nan", 1.0) | ||
| elif np.isinf(score[metric]): | ||
| mlflow.log_metric(f"{annotator}_{metric}_is_inf", 1.0) | ||
| else: | ||
| mlflow.log_metric(f"{annotator}_{metric}", score[metric]) | ||
|
|
||
| return run.info.run_id | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.