Going in a similar direction, I opened <issue#8223...
# flyte-v2-support
c
Going in a similar direction, I opened issue#8223 to discuss how Kueue eviction is handled. In our scenario, preemptions are expected and can happen many times before a task completes, so counting them against any retry budget wouldn't work.
f
Again we have done a lot of work for kueue and clustered tasks
@wide-vegetable-51116 @square-magazine-5075 imo we should deprecated and ideally delete kubeflow
👍 1
c
I think the issue is still valid. Preemptions counting as user retries conflicts with our daily usage pattern of low-priority workloads being preempted arbitrary times to succeed eventually when there is idle capacity (no higher priority workloads). It would be great if we could set
plugins.clustered.kueue.onEviction: requeue
to avoid this counting towards a retry budget.
Also happy to contribute if this is a direction you see fit.
f
@crooked-dawn-72075 is clusteredTask ok for you. i think as a direction in the community we should pursue this. its cleaner, way more flexible. we have been using it at some decent scale, more stable than kubeflow
c
I didn't try it with a real-world example yet but it should work. Will keep you posted once I ported a multi-node job.
f
ya if we move to clustered as a community, we can all maintain and extend it much faster and better
happy to collaborate deeper
c
I was able to run a multi-node training via clustered, will open a PR for the requeue functionality
f
C. @square-magazine-5075 you were making kueue work nicely with clustered what did we decide
s
we decided not to requeue in place in #8136 . A preempted gang ends the attempt and uses the tasks retries. There's no knob. @crooked-dawn-72075 PR would reverse that and add a config we previously removed. That said, pause in place is doable, we would need an SDK fix as well. If we do go that way, I'd make the behavior for preempted rather than a config. @freezing-airport-6809
f
requeue is handled by flyte, very clean retry story
🙏 1
@crooked-dawn-72075 our preference is to use requeue from flyte
c
I didn't get what you mean by "pause in place". By "requeue from flyte", do you mean #8136? That does not work for us, because we can have thousands of preemptions for low priority tasks, but do not want thousands of retries for real user errors.
s
Yes, requeue from Flyte is #8136, and #8258 is what I meant by pause in place. We want to keep one restart model, the Flyte retries. @freezing-airport-6809 to address this, we could stop counting Preempted against the user's retries and cap it with deadline instead (deadline enforcement still needs to be added to OSS). That means no waiting in place and no config, and it would fix Mitja's case.
f
Agree that we can set a timeout for kueue clustered task rather than retrying, while making the timeout configurable for users
f
@square-magazine-5075 lets talk tomorrow, i am being obtuse 😛
🙏 1
s
@crooked-dawn-72075 we spoke internally and we're good with waiting in place. We just want to set it per task instead of as a cluster config. The idea is a setting on
ClusteredTaskEnvironment
that says how many preemptions the Jobset can wait out. 0 is off and is the default, -1/inf is unlimited. Deactivated still ends the attempt like today. Your #8528 already has most of the logic, so most of it stays. I'm reviewing it now and will leave commends on what needs to change.
🙏 1
c
I've updated the PR. Based on the comments I judged that the preference is now a bool.
s
Thanks yes I'll take a look. I wanted to start with a bool since it'd be the simplest way to go about this. In case someone actually needs N preemptions we can think about how to wire it later.
👍 1
PR looks good to me, I want to have this sdk PR merged first though so that checkpoints don't fail with this new change: github.com/flyteorg/flyte-sdk/pull/1728 cc @faint-pilot-24699
❤️ 1
c
Thank you for the quick feedback!
🙌 1
s
@crooked-dawn-72075 we just cut a new release for flyte v2.0.54 which includes your PR. Would you like to pick up the follow up we discussed? With
resume_after_preemption
off, if the JobSet suspend is seen before Kueue writes
Evicted=True
, the attempt ends without a reason, so the preemption becomes a system retry instead of a user retry. The fix is to wait one more poll for the condition with the setting off too, as your PR already does with it on.
c
Sure, I opened github.com/flyteorg/flyte/pull/8313 for the follow-up.
🙏 1
s
Thanks! I left some commetns