Skip to content

test: add unit tests for common/worker modules#342

Draft
rebel-jinhwan wants to merge 12 commits intodevfrom
test/fix-and-common
Draft

test: add unit tests for common/worker modules#342
rebel-jinhwan wants to merge 12 commits intodevfrom
test/fix-and-common

Conversation

@rebel-jinhwan
Copy link
Copy Markdown
Contributor

@rebel-jinhwan rebel-jinhwan commented Feb 5, 2026

  • Fix conftest SchedulerConfig for v0.13 (default_factory)
  • Fix test_register_ops to use set_current_vllm_config context manager
  • Fix test_get_attn_backend_cls for v0.13 AttentionSelectorConfig API
  • Skip test_lora_functions_sync (integration test, RBLN_DEVICES conflict)
  • Convert test_resolver async test to sync with asyncio.run()
  • Extend rbln_envs tests: get_dp_impl, getattr, env overrides
  • Extend logger tests: once methods, log-once behavior, trace function
  • Extend platform tests: inference_mode, pin_memory, hybrid_kv, inplace, plugin_name
  • Add bucketing tests (18): linear/exponential managers, factory, edge cases
  • Add v1/worker/utils tests (3): OMP threads, CPU affinity
  • Add worker/metrics tests (19): StepMetrics, PrefillMetrics, PerformanceTracker
  • Add worker/utils tests (6): estimate_available_memory for ATOM/REBEL/OOM

Result: 68 passed, 1 skipped, 1 pre-existing failure (test_forward_context)

🚀 Summary of Changes

What does this PR do? What feature, fix, or improvement does it bring?


📌 Related Issues / Tickets

  • Resolves #
  • Related to #

✅ Type of Change

  • ✨ Feature (feature)
  • 🧠 Model support (model)
  • 🧬 Core engine changes (core)
  • 🛠 Bug fix (bug-fix)
  • ⚙️ Performance improvement (perf)
  • 🔁 Refactor or code cleanup (refactor)
  • 📄 Documentation (docs)
  • ❓ Other (other): please describe

🧪 How to Test

  1. Run ...
  2. Verify output: ...
  3. Edge case tested: ...

📸 Screenshots / Logs (if applicable)


📋 Checklist

  • PR title follows Conventional Commits format
  • This PR is linked to an existing issue
  • The test method is described, and the expected result is clearly stated
  • Relevant documentation has been updated (if applicable)

💬 Notes


huijjj and others added 4 commits February 5, 2026 02:23
example offline inference code won't run with memory utilization 1 as we
now have tighter memory estimation logics for kv cache allocation
- Fix conftest SchedulerConfig for v0.13 (default_factory)
- Fix test_register_ops to use set_current_vllm_config context manager
- Fix test_get_attn_backend_cls for v0.13 AttentionSelectorConfig API
- Skip test_lora_functions_sync (integration test, RBLN_DEVICES conflict)
- Convert test_resolver async test to sync with asyncio.run()
- Extend rbln_envs tests: get_dp_impl, __getattr__, env overrides
- Extend logger tests: once methods, log-once behavior, trace function
- Extend platform tests: inference_mode, pin_memory, hybrid_kv, inplace, plugin_name
- Add bucketing tests (18): linear/exponential managers, factory, edge cases
- Add v1/worker/utils tests (3): OMP threads, CPU affinity
- Add worker/metrics tests (19): StepMetrics, PrefillMetrics, PerformanceTracker
- Add worker/utils tests (6): estimate_available_memory for ATOM/REBEL/OOM

Result: 68 passed, 1 skipped, 1 pre-existing failure (test_forward_context)
@rebel-jinhwan rebel-jinhwan changed the title test: fix v0.13 compat and add unit tests for common/worker modules test: add unit tests for common/worker modules Feb 5, 2026
@rebel-jinhwan rebel-jinhwan self-assigned this Feb 5, 2026
Verify that enable_trace_function_call actually writes trace logs
by triggering a traced function call and checking file content,
instead of only asserting sys.gettrace() is not None.

Also remove unused 'patch' import.
vllm.lora.models was removed in vLLM v0.13. Update imports to
their new locations:
- LoRAMapping -> vllm.lora.layers
- LoRAModel -> vllm.lora.lora_model
- LoRAModelManager, LRUCacheLoRAModelManager -> vllm.lora.model_manager
- LoRALayerWeights, PackedLoRALayerWeights -> vllm.lora.lora_weights
…cpu_test marker

- Restructure tests/torch_compile/ into units/ (CPU-runnable) and
  integrations/ (RBLN NPU required) directories
- Register cpu_test pytest marker in pyproject.toml (matching upstream vLLM)
- Add pytestmark = pytest.mark.cpu_test to all unit test modules
  verified to run without RBLN NPU hardware
- Enables running CPU-only tests via: pytest -m cpu_test
Extract test_platform_plugins (requires RBLN NPU hardware) from
test_platform.py into its own file, so test_platform.py can use
module-level pytestmark = pytest.mark.cpu_test consistently
following the upstream vLLM convention of not mixing CPU and
device tests in the same file.
Base automatically changed from v0.13-initial to dev-0.13 February 9, 2026 04:46
@rebel-jiwoopark rebel-jiwoopark changed the base branch from dev-0.13 to dev February 11, 2026 10:45
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.

2 participants