other(test): improve worker test coverage#517
Open
rebel-jinhwan wants to merge 13 commits intodevfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive set of unit tests under tests/torch_compile/unit/v1/worker/ to substantially increase coverage for the v1 RBLN worker stack (worker, model runner, utils, and metrics), and consolidates shared pytest monkeypatch fixtures into the top-level torch-compile conftest.
Changes:
- Add new unit test suites for
RBLNWorker,RBLNModelRunner(incl. KV-cache helpers),v1.worker.utils, andv1.worker.metrics. - Move
monkeypatch_class/monkeypatch_modulefixtures fromtests/torch_compile/e2e/conftest.pyintotests/torch_compile/conftest.py. - Update
.gitignoreto stop ignoring.python-version.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/torch_compile/unit/v1/worker/test_worker.py |
Interface/contract tests around WorkerBase compliance for RBLNWorker. |
tests/torch_compile/unit/v1/worker/test_rbln_worker.py |
Broad unit coverage for RBLNWorker behavior and distributed init helpers. |
tests/torch_compile/unit/v1/worker/test_utils.py |
Unit tests for memory estimation and CPU affinity/threading helpers. |
tests/torch_compile/unit/v1/worker/test_rbln_model_runner.py |
Unit tests for RBLNModelRunner helpers, outputs, and edge cases. |
tests/torch_compile/unit/v1/worker/test_rbln_model_runner_kv_cache.py |
Unit tests focused on KV-cache-related helper logic. |
tests/torch_compile/unit/v1/worker/test_metrics.py |
Unit tests for metrics collection and reporting classes. |
tests/torch_compile/e2e/conftest.py |
Removes duplicated monkeypatch fixtures (moved to shared conftest). |
tests/torch_compile/conftest.py |
Adds shared monkeypatch_class / monkeypatch_module fixtures. |
.gitignore |
Un-ignores .python-version (potentially unrelated to test-coverage goal). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1c6f65a to
0c81ab6
Compare
facd915 to
63fcf6a
Compare
63fcf6a to
dd29ec6
Compare
rebel-jaehwang
approved these changes
Apr 10, 2026
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.
🚀 Summary of Changes
📌 Related Issues / Tickets
✅ Type of Change
release)feature)model)core)fix)perf)refactor)docs)other): please describe🧪 How to Test
.........📸 Screenshots / Logs (if applicable)
📋 Checklist
💬 Notes
Test Coverage Improvement Summary
Overall Metrics
Major File Improvements
The update significantly boosted coverage for core v1 worker modules, moving them from nearly untested to high stability.
v1/worker/metrics.pyv1/worker/rbln_worker.pyv1/worker/utils.pyv1/worker/rbln_model_runner.pyTest coverage (Before)
Test Coverage (After)