Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# install black isort flake
pip install black==24.4.2 isort==5.13.2 flake8==7.0.0
# install pytest and other dependencies
pip install pytest==9.0.2 fastapi==0.116.1 pydantic==2.11.7 uvicorn==0.35.0 uvloop==0.21.0 httpx==0.28.1 nvidia-ml-py==13.590.48 kubernetes==31.0.0
pip install pytest==9.0.2 -r inference_server/launcher/requirements-sans-vllm.txt

- name: Check for trailing whitespace
run: |
Expand Down
7 changes: 4 additions & 3 deletions inference_server/launcher/howto.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
1- HOW TO RUN THE UNIT TEST:

Install all the necessary packages:
Install all the necessary packages (feel free to use a later version of pytest if you prefer):
```bash
pip install -r requirements.txt
pip install pytest==9.0.2 -r requirements-sans-vllm.txt
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason we're making an exception for pytest? That is, why not pin it as-is and put it in the requirements file?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same comment applies to the python-code-quality file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

As far as I know, requirements.txt is typically used to state only the dependencies of the base software, not also the extra dependencies of the tests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Because pytest is a dev/testing-only dependency, not a runtime dependency of the launcher. The requirements-sans-vllm.txt file lists runtime deps

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The requirements.txt file is the one that lists the full dependencies of the launcher; requirements-sans-vllm.txt lists the subset of requirements.txt that is needed for testing the launcher. There is a difference because when being tested, we want to use the test's mocks of vllm rather than the real vllm.

```

Run the unit test doing:
```bash
python -m pytest test_launcher.py -v
python -m pytest tests/test_launcher.py -v
python -m pytest tests/test_gputranslator.py -v
```

2- RUN E2E TEST:
Expand Down
7 changes: 7 additions & 0 deletions inference_server/launcher/requirements-sans-vllm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fastapi==0.135.1
pydantic==2.12.5
uvicorn==0.42.0
uvloop==0.22.1
httpx==0.28.1
nvidia-ml-py==13.590.48
kubernetes==31.0.0
7 changes: 1 addition & 6 deletions inference_server/launcher/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
fastapi
pydantic
uvicorn
uvloop
nvidia-ml-py
kubernetes==31.0.0
-r requirements-sans-vllm.txt
# WARNING: vllm must be built from source on a macOS Silicon
vllm; sys_platform != "darwin" or platform_machine != "arm64"
Loading