Skip to content
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

Add tags to tasks, schedules and jobs #798

Closed
1 task done
agronholm opened this issue Oct 10, 2023 · 8 comments
Closed
1 task done

Add tags to tasks, schedules and jobs #798

agronholm opened this issue Oct 10, 2023 · 8 comments
Milestone

Comments

@agronholm
Copy link
Owner

Things to check first

  • I have searched the existing issues and didn't find my feature already requested there

Feature description

Tasks, schedules and jobs could have tags assigned to them. Schedulers could then pick only jobs that have compatible tags.

Use case

This will greatly help in heterogeneous environments where you need certain hardware or a certain operating system to run a particular job.

@agronholm agronholm added this to the 4.1 milestone Oct 10, 2023
@agronholm
Copy link
Owner Author

@NikBiks You can make your case here for a simpler solution.

@NixBiks
Copy link

NixBiks commented Oct 10, 2023

Not sure I understand your thinking around using < or > in the tags. Should tags simply be unique strings?

The moment you create a job, task or a schedule, you can also add a list of tags for it. And when you start a worker you can provide a list of tags to consume from. We can jump on a call sometime if you want (I'm in Copenhagen so same time zone I think) - not today though

@agronholm
Copy link
Owner Author

Suppose a job runs code that requires a specific Python version, or some other metric. It's very impractical to have to enable every valid value in the scheduler where valid tag values can be a numeric range.

@agronholm
Copy link
Owner Author

Imagine an AI related job requiring a certain amount of VRAM. Only schedulers hosted on machines that have at least that much VRAM available should pick up those jobs.

@agronholm
Copy link
Owner Author

The closest implementation that I can think of is the node affinity system in Kubernetes.

@agronholm
Copy link
Owner Author

I guess the term "tag" would be somewhat misleading in this case then.

@NixBiks
Copy link

NixBiks commented Oct 10, 2023

I think that gets complex real fast. I'd definitely advocate for a simple string - at least as the first step. The other feature could raise all kinds of trouble I think.

If not a simple string solution then you might want to rename to worker_consume_conditions or similar.

@agronholm
Copy link
Owner Author

Completed via f36a398.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants