Skip to content

Commit bef9d39

Browse files
reuvenperetzreuvenp
andauthored
Change metadata verification (#98)
Replace assertion of metadata data types with a warning. Co-authored-by: reuvenp <[email protected]>
1 parent 3f80214 commit bef9d39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mct_quantizers/common/metadata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ def _validate_metadata_value(value: Any) -> bool:
5858
if not all(isinstance(k, str) for k in metadata.keys()):
5959
Logger.error('metadata dictionary should only have string keys.')
6060
if not all(_validate_metadata_value(v) for v in metadata.values()):
61-
Logger.error('metadata dictionary values should only be strings, integers, floats, lists, '
62-
'or dictionaries with appropriate inner values.')
61+
Logger.warning('metadata dictionary values should be strings, integers, floats, lists, '
62+
'or dictionaries with appropriate inner values. Other types may cause issues '
63+
'with saving/loading the metadata.')
6364

6465
if metadata is None:
6566
metadata = {}

0 commit comments

Comments
 (0)