Skip to content

Fairness Keys & Weights #1036

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

Merged
merged 4 commits into from
Aug 19, 2025
Merged

Fairness Keys & Weights #1036

merged 4 commits into from
Aug 19, 2025

Conversation

Sushisource
Copy link
Member

What was changed

Added fairness keys/weights to priority

Why?

New feature

Checklist

  1. Closes

  2. How was this tested:
    Added test

  3. Any docs updates needed?

@Sushisource Sushisource requested a review from a team as a code owner August 19, 2025 21:58
@@ -994,18 +994,50 @@ class Priority:
3.
"""

fairness_key: Optional[str] = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to set one and not the other? Seems like the optionality matches the proto, but will it just fail if we do that, in which case it may be worth making it optional as a pair here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does because of inheritance reasons I believe? I dunno, that's a good question though. @dnr ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At minimum, we don't want the pair anyway because it can make sense to set a key and have it assume the default weight.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they're inherited separately so it's probably best to treat them separately. And yes, a very common case will be to set a key without a weight (so it gets default 1.0). It doesn't really make sense to set a weight without a key though.

@Sushisource Sushisource enabled auto-merge (squash) August 19, 2025 22:41
@Sushisource Sushisource merged commit a09bb85 into main Aug 19, 2025
26 of 28 checks passed
@Sushisource Sushisource deleted the fairness branch August 19, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants