mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3387] [CLOSED] [Engine] reject duplicate GPUs in automatic replica groups #4605
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4605
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3387
Author: @j-luwierski
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:codex/strata-duplicate-replica-gpus📝 Commits (1)
fd51c4b[Engine] reject duplicate GPUs in automatic replica groups📊 Changes
2 files changed (+25 additions, -5 deletions)
View changed files
📝
serve/replicas.py(+6 -5)📝
serve/test_replicas.py(+19 -0)📄 Description
Problem and result
On the current upstream
main,gpu_groups()accepts overlapping GPUs when a numeric replica count derives groups from the configured GPU list. Reproduced before the fix:{"gpu":[0,0],"replicas":2}returns[[0],[0]];{"gpu":[0,1,1,2],"replicas":2}returns[[0,1],[1,2]]. The server can then start independent replica engines on the same card. After this change, these configurations raiseReplicaConfigErrorbefore replica engines start.Related discussion
PR #2953 was closed during the 0.2.0-beta tracker reset, not declined. The original change was revalidated against current
main. Search of open and closed issues and PRs forgpu_groups, duplicate cards and replica GPU grouping found no other fix for this case.Approach
Build numeric groups and pass them through the same non-empty and duplicate-card validation used for explicitly named groups. Add regression coverage for duplicate GPU IDs in list and comma-separated forms, normalized duplicate IDs, explicit groups, preserved card order, and disabled replica counts. Valid group ordering and the no-replica path remain unchanged. No engine backend or defaults are changed.
Validation
Passed:
mainate88ee39d1d6be6e3364183af3b39b62a7ed6f211, Linux Debian 13, Python 3.13.5: duplicate GPU configurations returned overlapping groups instead of raising an error.uv run --with-requirements requirements.txt python -m unittest serve.test_replicas serve.test_parallel -q, on the change based one88ee39d1d6be6e3364183af3b39b62a7ed6f211, Linux Debian 13, Python 3.13.5: 64 tests passed in 71.163 seconds. These tests use fake engines; no model or GPU was used.git diff --check: passed.Failed:
python3 -m unittest serve.test_replicas serve.test_parallel -qattempt could not importjinja2from the system Python. The same suite then passed when run with the pinned repository requirements in a temporaryuvenvironment.Not run:
Limits
This validates configuration handling and fake-engine server behavior. It does not establish GPU runtime behavior or performance on hardware.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.