:thread: Forcing local execution for plugin tasks
# flyte-support
c
🧵 Forcing local execution for plugin tasks
I am developing an agent for Armada and I have an accompanying ArmadaTask. One of the pain points we have is that when
ArmadaTasks
are run locally they are actually just run against Armada, because that is what the agent code does. Realistically we're going to be wrapping most general compute tasks as an
ArmadaTask
so we need some way for
ArmadaTasks
to behave like
PythonTasks
when run locally and exercise the plugin logic only when running remotely. I am digging into how pyflyte works now and I'm not seeing a clean way to do this yet.
By the time that the agent is executed i believe the task logic is already containerized, so I think it something would have to be done earlier in the stack...
I suppose we could either fork the task plugin resolution logic or extend the task class with additional logic.
t
@glamorous-carpet-83516 what do you think?
it should be possible.
Copy code
def execute(self, **kwargs) -> Any:
  return PythonFunctionTask.execute(self, **kwargs)
c
Excellent thank you. I'll give it a shot
It works!
kevin cutie 2
🦜 1