https://flyte.org logo
#flytekit
Title
# flytekit
r

Rahul Mehta

08/29/2022, 7:31 PM
When registering a custom
TypeTransformer
w/ the
TypeEngine
, does the module need to be explicitly imported by one of the files containing workflows or tasks in order for it to be picked up? Based on the example of the
NumpyArrayTransformer
it seemed like it, but not sure where that needs to be declared
For context, I was attempting to add a transformer to support
collections.abc.Sequence[T]
as a valid type, and was previously hitting this error:
Copy code
ValueError: Generic Type <class 'collections.abc.Sequence'> not supported currently in Flytekit.
y

Yee

08/29/2022, 7:59 PM
yes, it does… because we figured if people were writing a type transformer, they’d also be writing a type.
and when the user imported the type, then that would trigger the transformer loading as well.
but this doesn’t include the case where the type and the transformer are in different libraries
👍 1
to mitigate this issue you can use flytekite’s auto loading plugin behavior.
that is, if you add this entrypoint to your setup.py, then any
import flytekit
would trigger it as well.
does that make sense.
r

Rahul Mehta

08/29/2022, 8:01 PM
Yep that makes sense -- we'll need to figure out a slightly different way to do that since we're using Bazel
https://github.com/flyteorg/flyte/issues/2823 (cc @Ketan (kumare3) @Eduardo Apolinario (eapolinario) based on our earlier discussion)
e

Eduardo Apolinario (eapolinario)

08/30/2022, 3:31 AM
Great, thank you. We're going to prioritize this for the upcoming release.
🙏 1