-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
There is something odd when serializing some time and space (output) axes.
I suspect due to the serialization of the axis field, which is a Union warnings are generated.
Warnings such as:
PydanticSerializationUnexpectedValue: Expected `TimeOutputAxis` but got `SpaceOutputAxis` with value `SpaceOutputAxis(size=43, ...', unit=None, scale=1.0)` - serialized value may not be as expected
PydanticSerializationUnexpectedValue: Expected `TimeOutputAxisWithHalo` but got `SpaceOutputAxis` with value `SpaceOutputAxis(size=43, ...', unit=None, scale=1.0)` - serialized value may not be as expected
PydanticSerializationUnexpectedValue: Expected `TimeOutputAxis` but got `SpaceOutputAxis` with value `SpaceOutputAxis(size=123,...', unit=None, scale=1.0)` - serialized value may not be as expected
PydanticSerializationUnexpectedValue: Expected `TimeOutputAxisWithHalo` but got `SpaceOutputAxis` with value `SpaceOutputAxis(size=123,...', unit=None, scale=1.0)` - serialized value may not be as expected
PydanticSerializationUnexpectedValue: Expected `TimeOutputAxis` but got `SpaceOutputAxis` with value `SpaceOutputAxis(size=167,...', unit=None, scale=1.0)` - serialized value may not be as expected
PydanticSerializationUnexpectedValue: Expected `TimeOutputAxisWithHalo` but got `SpaceOutputAxis` with value `SpaceOutputAxis(size=167,...', unit=None, scale=1.0)` - serialized value may not be as expected
See any test log for more examples.
Any round-trip serialization-deserialization test passes, but it would still be nice to make serialization more rigorous and avoid these warnings.
Metadata
Metadata
Assignees
Labels
No labels