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
We encountered a couple of different failure modes when serializing workflows with the following types:
Unknown type in a Union:
In general, Union[T, R] where T is a known type (ie. np.array or pd.DataFrame) and R is unknown fails. We encountered failures with the following types:
File "/data/.cache/d6b3232365b53688514105c765196062/execroot/alpha/bazel-out/k8-fastbuild/bin/thm/flyte/workflows/model_training/platform_rate_pipeline.register.runfiles/prod_flytekit/flytekit/core/type_engine.py", line 989, in get_literal_type
ValueError: Type of Generic Union type is not supported, Type <class 'scipy.sparse._base.spmatrix'> not supported currently in Flytekit. Please register a new transformer
Interestingly this fails even in the case where a transformer is registered.
collections.abc
Any usage of types from collections.abc appears to lead to a type error in the code path to handle generics. Tested with the following types:
Describe the bug
We encountered a couple of different failure modes when serializing workflows with the following types:
Union
:In general,
Union[T, R]
whereT
is a known type (ie.np.array
orpd.DataFrame
) andR
is unknown fails. We encountered failures with the following types:Example error:
Interestingly this fails even in the case where a transformer is registered.
collections.abc
Any usage of types from
collections.abc
appears to lead to a type error in the code path to handle generics. Tested with the following types:Expected behavior
collections.abc
using pickle transportUnion
can fall back to pickle transportAdditional context to reproduce
The following tasks reproduce the issue:
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: