Skip to content

Commit

Permalink
Don't validate empty metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
delverme-equi committed Dec 21, 2023
1 parent 10d54ce commit 927a1f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions experiment_buddy/experiment_buddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Expand Down

0 comments on commit 927a1f5

Please sign in to comment.