Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/.nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ nav:
- Developer Guide:
- Contributing: contributing/README.md
- Continuous Batching:
- Testing: contributing/continuous_batching/tests.md
- Tests:
- End-to-End: contributing/continuous_batching/tests/e2e_testing.md
- Step-by-Step: contributing/continuous_batching/tests/scheduling_inference_steps.md
- Other Tests: contributing/continuous_batching/tests/other_tests.md

- Getting Started:
- Installation: getting_started/installation.md
Expand All @@ -34,4 +37,7 @@ nav:
- Developer Guide:
- Contributing: contributing/README.md
- Continuous Batching:
- Testing: contributing/continuous_batching/tests.md
- Tests:
- End-to-End: contributing/continuous_batching/tests/e2e_testing.md
- Step-by-Step: contributing/continuous_batching/tests/scheduling_inference_steps.md
- Other Tests: contributing/continuous_batching/tests/other_tests.md
3 changes: 0 additions & 3 deletions docs/contributing/continuous_batching/tests.md

This file was deleted.

10 changes: 10 additions & 0 deletions docs/contributing/continuous_batching/tests/e2e_testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# End output correctness tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we find a better title for this section? It would be nice to coincide with the chapter on the left of the page. Currently we have:

End-to-End -> title: End output correctness tests -> file name: e2e_testing.md
Step-by-Step -> title: Scheduler inference steps tests -> file name: scheduling_inference_steps.md
Other Tests -> title: Other tests -> file name: other_tests.md

what about:

Output Tests -> title: Output Tests -> file name: output_tests.md
Scheduler Tests -> title: Scheduler Tests -> file name: scheduler_tests.md
Other Tests -> title: Other tests -> file name: other_tests.md

e.g. making things more uniform?

Copy link
Collaborator Author

@sducouedic sducouedic Jul 18, 2025

Choose a reason for hiding this comment

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

I am not sure about scheduler_tests only because there is some other test test_cb_max_tokens in test_spyre_cb.py that is also testing the scheduler (but just the constraint), without really belonging to this test suite imo. I want to emphasis that this is somehow "step-by-step correct execution". And it won't be only about the scheduler correctness, on the compiler side it is also required that the compiled graph cab adapt to different scenarios of prompts_length/max_tokens/steps joining.

But I agree the current naming is a bit fuzzy, I changed it a lot

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But output_test is great naming, I change that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the scheduler tests, I renamed everything to scheduler_steps tests 👍


!!! note
Unless otherwise specified, all the continuous batching tests are running with `max_model_len=256`

::: tests.e2e.test_spyre_basic
options:
members:
- test_output
- test_batch_handling
6 changes: 6 additions & 0 deletions docs/contributing/continuous_batching/tests/other_tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Other tests

!!! note
Unless otherwise specified, all the continuous batching tests are running with `max_model_len=256`

::: tests.e2e.test_spyre_cb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Scheduler inference steps tests

!!! note
Unless otherwise specified, all the continuous batching tests are running with `max_model_len=256`

!!! warning
End output correctness is not verified in those tests (TODO should we? maybe for some of them?)

::: tests.e2e.test_spyre_cb_inference_steps
24 changes: 18 additions & 6 deletions tests/e2e/test_spyre_basic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""Verification of vLLM output by comparing with HF

If errors occur, these can be analyzed/debugged by setting
`DISABLE_ASSERTS = True` in spyre_util.py and by rerunning the
test using `pytest --capture=no tests/spyre/test_spyre_basic.py`
After debugging, `DISABLE_ASSERTS` should be reset to `False`.

Run `python -m pytest tests/e2e/test_spyre_basic.py`.
"""

Expand Down Expand Up @@ -45,11 +50,12 @@ def test_output(
The same prompts are also input to HF. The generated output
including text, token ids, and logprobs, is verified to be
identical for vLLM and HF.

If errors occur, these can be analyzed/debugged by setting
'DISABLE_ASSERTS = True' in spyre_util.py and by rerunning the
test using 'pytest --capture=no tests/spyre/test_spyre_basic.py'
After debugging, DISABLE_ASSERTS should be reset to 'False'.

Configuration for CB - parameters are combinatorial:
* max_num_seqs: 4
* tensor parallelism: 1, 2, 4, 8
* number of prompts: 4 (Chicken soup prompts)
* max tokens: 20 (same for all the prompts)
'''

skip_unsupported_tp_size(tp_size, backend)
Expand Down Expand Up @@ -156,7 +162,13 @@ def test_batch_handling(model: str, backend: str, cb: int,
monkeypatch: pytest.MonkeyPatch):
"""Test that the spyre worker correctly handles
continuous batches of requests that
finish after different numbers of forward passes"""
finish after different numbers of forward passes

Configuration for CB - parameters are combinatorial:
* max_num_seqs: 2
* number of prompts: 4 (Chicken soup prompts)
* max tokens: [5, 20, 10, 5]
"""

prompts = get_chicken_soup_prompts(4)

Expand Down
Loading
Loading