cuddly-jelly-27016
01/22/2025, 1:59 AM@dataclass
class ParentDC:
...
@dataclass
class ChildDC(ParentDC):
...
class ParentDCTransformer(TypeTransformer[ParentDC]):
def __init__(self):
super().__init__("ParentDC Transformer", ParentDC)
...
# Register a type transformer for the parent dataclass
TypeEngine.register(ParentDCTransformer())
This means that flytekit should be able to use ParentDCTransformer
to handle instances of both ParentDC
and ChildDC
. Keep in mind that we're omitting the definition of ParentDCTransformer
.
This was the case in flytekit<1.14.0. However, flyteorg/flytekit#2815 introduced a regression in which objects of type ChildDC
are now handled by flytekit dataclass transformer.
Expected behavior
flytekit users should be able to define custom dataclass type transformers.
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
• Yes
Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
01/22/2025, 1:59 AM