ancient-wolf-19325
06/16/2024, 3:58 AMIgnoreOutputs exception for all other ranks except rank 0. This ensures that only the worker with rank 0 returns its value to subsequent tasks in the workflow.
import os
from flytekit import task, IgnoreOutputs
@task
def some_task():
if os.environ.get("RANK") != "0":
raise IgnoreOutputs()
# Your code here
For more details, refer to the discussion on the Flyte forum.
Would you like more details on this?
Sources:
- Flyte forum
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1718510298.322739 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.