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
Traceback (most recent call last):
File "yacs_config.py", line 23, in<module>
config = update_spec_config(SpecialConfig(spec))
File "yacs_config.py", line 18, in update_spec_config
config.merge_from_other_cfg(new_config)
File "/home/manifold/miniconda3/lib/python3.8/site-packages/yacs/config.py", line 217, in merge_from_other_cfg
_merge_a_into_b(cfg_other, self, self, [])
File "/home/manifold/miniconda3/lib/python3.8/site-packages/yacs/config.py", line 456, in _merge_a_into_b
v = _check_and_coerce_cfg_value_type(v, b[k], k, full_key)
File "/home/manifold/miniconda3/lib/python3.8/site-packages/yacs/config.py", line 510, in _check_and_coerce_cfg_value_type
raise ValueError(
ValueError: Type mismatch (<class '__main__.SpecialConfig'> vs. <class 'yacs.config.CfgNode'>) with values ( vs. field1: 1
field2: bar) for config key: special
Wouldn't it make sense to allow this case, because SpecialConfig is a subclass of CfgNode?
It's not obvious that this is useful, because I could do without the subclass. However having a class allows for typed access to values and a constructor with default values
The text was updated successfully, but these errors were encountered:
This would allow doing the following thing:
At present, this won't work, yielding the error:
Wouldn't it make sense to allow this case, because
SpecialConfig
is a subclass ofCfgNode
?It's not obvious that this is useful, because I could do without the subclass. However having a class allows for typed access to values and a constructor with default values
The text was updated successfully, but these errors were encountered: