flyte icon indicating copy to clipboard operation
flyte copied to clipboard

The pytorch plugin doesn't copy Pod Metadata to the PyTorchJob CR

Open evan-sadler opened this issue 3 months ago • 2 comments

This is my basic understanding...

I would like to run multi-node training using the pytorch plugin instead of ray. We use Kueue for gang scheduling, which happens automatically so long as the pod label propagates to the CR.

I believe that ray already has this setup and pytorch just hasn't gotten it setup yet. Claude 1-shotted a solution, so I imagine it's a pretty easy change https://github.com/flyteorg/flyte/pull/7833.

Would really appreciate it if someone on your end could take a look!

evan-sadler avatar Aug 11 '26 23:08 evan-sadler

You are correct: as of flyteorg/flyte PR #7833, the PyTorch plugin did not propagate pod-level metadata (labels/annotations) to the PyTorchJob Custom Resource (CR), which is necessary for tools like Kueue to perform gang scheduling. The Ray and Dask plugins already set ObjectMeta on their CRs, but PyTorch previously only set metadata on the replica pod templates, not the CR itself.

The proposed fix in PR #7833 sets ObjectMeta on the PyTorchJob CR using a fresh call to flytek8s.ToK8sPodSpec, ensuring that execution-level labels and annotations are correctly propagated for scheduling and monitoring. This change aligns PyTorch plugin behavior with Ray and Dask, enabling Kueue and similar tools to function as expected. Would you like more detail on how to apply or test this fix?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @herald to ask follow-up questions. See runllm.com for more!

runllm avatar Aug 11 '26 23:08 runllm

Fixed by https://github.com/flyteorg/flyte/pull/7833

pingsutw avatar Aug 13 '26 18:08 pingsutw