Summary
The user is inquiring about the absence of a built-in mechanism for serializing TypeVar
instances and is seeking suggestions to resolve this issue. They reference a pull request that added support for typing.Annotated
as a possible solution. The user also questions whether the issue is specific to FlyteFile
and requests an example of what is meant by "type at instances." They have identified that the problem arises when a task's input/output includes a generic TypeVar
, which complicates the serialization process. During serialization, the actual type is known, but during deserialization, the deserializer mistakenly attempts to deserialize to the TypeVar
instead of the concrete type. The user mentions a workaround where they explicitly serialize the concrete type information alongside the serialized object and ignore the type information passed into to_python_value
, opting to use the serialized type information instead.