summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-26 00:21:26 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-26 00:21:26 +0200
commit31da07d71f40eec7e4ef1c053f913b86137922bc (patch)
tree996a30b8ee67e0da47085eade885c26e02ad0e91
parentadf411873c553a587495149b645a49f2bfb4e131 (diff)
Update best run fun in artifacts
-rw-r--r--training/artifacts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/training/artifacts.py b/training/artifacts.py
index 9f970f8..a059833 100644
--- a/training/artifacts.py
+++ b/training/artifacts.py
@@ -59,7 +59,7 @@ def save_model(run: Run, tag: str) -> None:
# TODO: be able to download from w&b
-def find_best_model(entity: str, project: str, tag: str, metric: str, mode: str) -> Run:
+def find_best_run(entity: str, project: str, tag: str, metric: str, mode: str) -> Run:
"""Find the best model on wandb."""
if mode == "min":
default_metric_value = sys.maxsize
@@ -107,7 +107,7 @@ def find_best_model(entity: str, project: str, tag: str, metric: str, mode: str)
help="Min or max value of metric",
)
def main(entity: str, project: str, tag: str, metric: str, mode: str) -> None:
- best_run = find_best_model(entity, project, tag, metric, mode)
+ best_run = find_best_run(entity, project, tag, metric, mode)
save_model(best_run, tag)