Open
Conversation
Shuffles the model list before distributing across instances (round-robin). This prevents systematic biases like alphabetically-first models always landing on instance 0. Use --no-shuffle to restore deterministic (alphabetical) assignment if needed.
| all the "A" models alphabetically). | ||
|
|
||
| Examples: | ||
| 9 models, 3 instances → [[m0,m3,m6], [m1,m4,m7], [m2,m5,m8]] |
There was a problem hiding this comment.
SUGGESTION: Docstring examples show deterministic round-robin output, but with the new default shuffle=True, the actual distribution will be randomized. Consider noting that these examples assume shuffle=False, e.g.:
Examples (with shuffle=False, showing round-robin logic):
This avoids confusing readers who might expect the documented output from the default behavior.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Merge with minor improvement Overview
Issue Details (click to expand)SUGGESTION
Other Observations (not in diff)
Files Reviewed (1 file)
Overall: Clean, well-structured change. The implementation correctly copies the input list before shuffling (avoiding mutation of the caller's list), the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shuffles the model list before distributing across instances.
Why:
Previously, models were assigned in order (alphabetically if from YAML). This meant
anthropic/*models always landed on early instances,z-ai/*on later ones. If there are any systematic differences between instances (boot timing, network, etc.), this could introduce bias.Changes:
distribute_models()now shuffles by default before round-robin assignment--no-shuffleflag to restore deterministic behavior if neededExample: