-
Notifications
You must be signed in to change notification settings - Fork 17
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
remove roles to merge training role rules with training tag rules #1993
remove roles to merge training role rules with training tag rules #1993
Conversation
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.
This looks good to me.
include_tags = ['pulsar'] | ||
exclude_tags = ['pulsar-training-large', 'training-exempt'] | ||
slurm_preferred_for_training = pulsar_score is not None and pulsar_score < pulsar_score_slurm_threshold | ||
training_job_matches_specs = (not slurm_preferred_for_training) and helpers.tag_values_match(entity, include_tags, exclude_tags) |
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.
Since only this line is different between slurm and pulsar, maybe it would make sense to move this code to a seperate file that we just import. A possible future enhancement. I imagine more scenarios like this will pile up.
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 agree - most of the code in the 3 blocks is identical.
e2fb865
to
eccf27b
Compare
For consideration: The aim is that somebody could add the tag 'training' to their history and get the same treatment as somebody in a training group, which could be useful for testing a tutorial ahead of time.
For issue #1942