brash-london-45337
04/30/2024, 4:58 AMDefaultTaskResolver
. This implementation was working on an older version of flytekit (1.3.2), but after updating to 1.9.1, workflows using this annotation are now failing pyflyte workflow serialization with Could not find LHS for PythonFunctionTask
.
Debugging a bit, it appears it is failing this validation, I believe because it's using the default_task_resolver during serialization. Is there any way to pass in, and or register, their custom task resolver as part of pyflyte serialization? Obviously, one solve is to stop using their custom task annotation, but a lot of their workflows are currently built around this and would help avoid a lot of toil on their part.glamorous-carpet-83516
04/30/2024, 4:59 AMglamorous-carpet-83516
04/30/2024, 5:00 AMfreezing-airport-6809
brash-london-45337
04/30/2024, 5:03 AMPythonFunctionTask
as part of a function attribute:
class FITaskResolver(DefaultTaskResolver):
def name(self) -> str:
return "FITaskResolver"
def load_task( # pyright: ignore[reportIncompatibleMethodOverride]
self, loader_args: List[str]
) -> PythonAutoContainerTask:
return super().load_task(loader_args).task_wrapped
brash-london-45337
04/30/2024, 5:06 AM@dataclass_json
which only supports things that can json.dumps
> ◦ Allow any input/output types that your python tools can typecheck, instead of restricting to flyte's very limited type checking (no generics is a big one, plus lots of issues and surprises with stuff like Optional/Union/etc.)
> ◦ Basically, I wish flyte designed its python ergonomics around what its python users want to do, not what its protobuf backends want to do. The more I use flyte the more I feel this is completely upside down.glamorous-carpet-83516
04/30/2024, 5:13 AMfreezing-airport-6809
• Allow positional args (flyte doesn't support it, iiuc because protobuf)This is just abundance of caution on our part TBH. We could easily fix this and maybe the fix is limited to only this part. Help with this would be appreciated.
◦ Allow `*args`/`**kwargs` (flyte doesn't support it, iiuc because protobuf)Related to ^
◦ Allow any input/output serdes via e.g. jsonpickle, instead of restricting to flyte's limited set of types it can map to protobuf +Supported - pickle. Just use Any or do not use a dataclass. All unknown types are supportedwhich only supports things that can@dataclass_json
json.dumps
◦ Allow any input/output types that your python tools can typecheck, instead of restricting to flyte's very limited type checking (no generics is a big one, plus lots of issues and surprises with stuff like Optional/Union/etc.)This is supported through pickle. Maybe you are using an old version
◦ Basically, I wish flyte designed its python ergonomics around what its python users want to do, not what its protobuf backends want to do. The more I use flyte the more I feel this is completely upside down.Fair ^ We are working on this Can we have a deep dive with these users. We would love to understand examples cc @brash-london-45337 ^
freezing-airport-6809
freezing-airport-6809
brash-london-45337
05/03/2024, 4:17 AMfreezing-airport-6809
freezing-airport-6809