From 927a1f5ec66c54731189570e75ffa11240129993 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 21 Dec 2023 15:01:13 +0530 Subject: [PATCH] Don't validate empty metrics --- experiment_buddy/experiment_buddy.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/experiment_buddy/experiment_buddy.py b/experiment_buddy/experiment_buddy.py index 9462cb9..34f6d4f 100644 --- a/experiment_buddy/experiment_buddy.py +++ b/experiment_buddy/experiment_buddy.py @@ -55,8 +55,9 @@ def __init__(self, experiment_id, debug, wandb_kwargs): self.already_logged = set() def log(self, metrics_dict, **kwargs): - # args, = args - if isinstance(metrics_dict, dict): + if not metrics_dict: + pass + elif isinstance(metrics_dict, dict): new_keys = set(metrics_dict.keys()) if new_keys.issubset(self.already_logged): raise ValueError(f"Keys {new_keys.intersection(self.already_logged)}") diff --git a/setup.py b/setup.py index 47f7797..602d85e 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( name='experiment_buddy', - version='0.0.20', + version='0.0.21', packages=["experiment_buddy", "experiment_buddy.buddy_init", "scripts"], package_data={'scripts': ['*/*.sh']}, url='https://github.com/ministry-of-silly-code/experiment_buddy/',