helpful-van-10149
06/04/2024, 6:36 PMline 997, in get_transformer
raise ValueError(f"Generic Type {python_type.__origin__} not supported currently in Flytekit.")
ValueError: Generic Type <class 'collections.defaultdict'> not supported currently in Flytekit.
There is no issue in flytekit 1.3.2 we used before.
Is this the new constraint we introduce to newer version?
Is there workaround to support generic type?helpful-van-10149
06/04/2024, 6:57 PM@task(
cache=True,
cache_serialize=True,
cache_version="v3",
requests=Resources(mem="200Gi"),
retries=0,
)
def correlation_job(
table_s3_path: str, train_start: str, train_end: str, config_file: str, k: int
) -> DefaultDict:
the code block that triggers the issuethankful-minister-83577
dict
?thankful-minister-83577
helpful-van-10149
06/04/2024, 9:26 PMcan you make the return type justWe are recommending the user to do this.?dict
you’re not looking to have flytekit interpret the entire structure of the map right?I don't since this is user's code...
thankful-minister-83577
Dict[str, T]
(as opposed to a dict
) flytekit will interpret it as a LiteralMapthankful-minister-83577
thankful-minister-83577
helpful-van-10149
06/04/2024, 10:51 PM