You cannot directly access a FlyteRemote object from within a Flyte task in standard Flyte execution, as tasks are executed in isolated containers and FlyteRemote is intended for orchestrating and interacting with executions from outside the workflow (e.g., in your local environment or a Jupyter notebook). However, in the context of eager workflows, FlyteRemote is used under the hood to launch tasks and workflows, but this is managed by the Flytekit runtime, not user code inside the task itself. According to the
eager workflows documentation, FlyteRemote is set up by the workflow infrastructure, not by user code inside a task.
If you need to interact with the Flyte control plane from within a task (for example, to launch other executions), this is not a supported pattern in Flyte's design. Tasks should be stateless and not manage workflow orchestration themselves. For orchestration, use FlyteRemote in your client code or workflow definitions, not inside tasks. Would you like more detail on how FlyteRemote is typically used or on alternatives for dynamic execution?
Sources:
-
eager workflows documentation 👍 0 button 👎 0 button 💡
Hint: Mention @runllm in the thread for followups.