You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating OmegaConf from from_dotlist, yaml loader tries to convert date-formatted strings into date type, therefore raises error when validating the type of values.
OmegaConf.from_dotlist(["my_date=2019-11-11"])
>>>
.../site-packages/omegaconf/config.py in _prepare_value_to_add(self, key, value)
448 if not Config.is_primitive_type(value):
449 full_key = self.get_full_key(key)
--> 450 raise ValueError("key {}: {} is not a primitive type".format(full_key, type(value).__name__))
451
452 if self._get_flag('readonly'):
ValueError: key my_date: date is not a primitive type
This error also blocks the overriding of configuration values by using cli arguments in hydra.
Issue
When instantiating OmegaConf from
from_dotlist
, yaml loader tries to convert date-formatted strings intodate
type, therefore raises error when validating the type of values.This error also blocks the overriding of configuration values by using cli arguments in hydra.
Potential workaround
Could be solved by removing implicit timestamp resolvers in default
yaml.SafeLoader
.(Related stackoverflow: https://stackoverflow.com/questions/34667108/ignore-dates-and-times-while-parsing-yaml)
The text was updated successfully, but these errors were encountered: