-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
Question
I like to use msgspec to parse YAML configs for training models. I find that when I define a struct to have a parameter that is a float and then, in my YAML config, I write a value like 0.00005 in scientific notation as 5e-5, I end up getting the error msgspec.ValidationError: Expected float, got str- at$.my_float_parameter`.
What is the best way to avoid that error without having to convert every float parameter into a float after an object is parsed?
FHU-yezi and q0w
Metadata
Metadata
Assignees
Labels
No labels