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
a more informative error message, such as "to_yaml got a bad input of type <class 'str'>".
Does it make sense to do anything besides throwing an error? The output of the to_yaml function is a string, so I'm not sure what would be the correct way to handle inputs that are strings.
The text was updated successfully, but these errors were encountered:
Yes, I think it makes sense. assertion errors should be not be raised for bad user inputs, only for internal bugs.
I think a plain ValueError explaining the valid inputs to the function will be good enough.
You can pass
OmegaConf.to_yaml
adict
orlist
with no problem:But if you pass a
str
, you get anAssertionError
:Desired Behavior:
"to_yaml got a bad input of type <class 'str'>"
.Does it make sense to do anything besides throwing an error? The output of the
to_yaml
function is a string, so I'm not sure what would be the correct way to handle inputs that are strings.The text was updated successfully, but these errors were encountered: