-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kueue job priorities #13
Conversation
Jobs can now specify `SchedulingOptions`, which include the Kueue local queue and priority class names. Adds example priority classes (background, development, production) and preemption options to the cluster queue manifest. A sample "production" job has been added to simplify the demo of preemption and priority based workload ordering in Kueue.
The `runner.py` module was growing to a point where readability was hampered. This commit splits it up into the `jobs.runner` package, with submodules grouped by execution platform. Also, introduces a `KubernetesNamespaceMixin` to simplify determining the current or desired namespace for a workload.
resources: ResourceOptions | None | ||
resources: ResourceOptions | None = None | ||
"""Resource requests for this job in Kubernetes format (see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes)""" | ||
image: ImageOptions | None | ||
image: ImageOptions | None = None | ||
scheduling: SchedulingOptions | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we handle if these are not set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to the implementation of the runners to decide. Some might throw an error, whereas others might completely ignore an option that was passed because it is not applicable (e.g., resource limits when executing locally).
import logging | ||
|
||
from kubernetes import client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we name the runner
directory runners
since it contains multiple runners?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept it as runner
so imports of the types would remain stable, but I'm open to renaming it as well.
Scheduling Options (priority classes / Kueue local queue)
Jobs can now specify
SchedulingOptions
, which include the Kueue local queue and priority class names. The settings are validated upon job submission.Adds example priority classes (background, development, production) and preemption options to the Kueue cluster queue manifest YAML.
A sample "production" job has been added to simplify the demo of preemption and priority based workload ordering in Kueue.
Refactorings
The
runner.py
module was broken up into a proper packagejobs.runner
, since its size was growing to a point where readability was hampered.Breaking Changes
If you have previously set up Kueue in your cluster with the
single-clusterqueue-setup.yaml
manifest, you will have to reapply these resources.Closes #9, #10