-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Typically during training a DL model, there are many train losses/metrics and less validation losses/metrics. In this case, there would not be many "validation" update rows. Here is an example:
In [1]: from cox.store import Store
In [2]: store = Store('test')
Logging in: /home/panda/test/05470312-67d5-405b-ae74-d81b3b770be4
In [3]: store.add_table('metrics', {'train': float, 'val': float}
...: )
Out[3]: <cox.store.Table at 0x7f759f9af0b8>
In [4]: store['metrics']
Out[4]: <cox.store.Table at 0x7f759f9af0b8>
In [5]: t = store['metrics']
In [6]: t.update_row({'train': 1.23})
In [7]: t.flush_row()
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
~/anaconda3/envs/dev/lib/python3.7/site-packages/cox/store.py in flush_row(self)
390 try:
--> 391 assert self._curr_row_data[k] is not None
392 except:
AssertionError:
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-7-d818515cef82> in <module>
----> 1 t.flush_row()
~/anaconda3/envs/dev/lib/python3.7/site-packages/cox/store.py in flush_row(self)
397 msg = 'Col %s is None!' % k
398
--> 399 raise ValueError(msg)
400
401 for k, v in self._curr_row_data.items():
ValueError: Col val is None!
Would it be possible to add an optional argument to flush_row() to allow None or would that mess things up down the line?
Metadata
Metadata
Assignees
Labels
No labels