Thank you for your interest in contributing to GuideLLM! This document provides detailed instructions for setting up your development environment, implementing changes, and adhering to the project's best practices. Your contributions help us grow and improve this project.
Before you begin, ensure you have the following installed:
- Python 3.10 or higher
uv(recommended), pip, or another python package manager- Git
-
Clone the repository to your local machine:
git clone https://github.com/vllm-project/guidellm.git cd guidellm -
(Optional) If you plan to contribute changes back, fork the repository and clone your fork instead:
git clone https://github.com/<your-username>/guidellm.git cd guidellm
To install the required dependencies for the package and development, run one of:
Synchronize a local venv with our locked dependency versions found within the projects uv.lock.
uv sync --frozenThe --frozen flag tells uv to avoid modifying dependency versions.
To use tooling in the venv either activate it with . .venv/bin/activate or prepend commands with uv run to run them from within the venv.
First create and activate a venv.
python -m venv .venv && . .venv/bin/activateThen install into that venv with pip.
pip install --group dev -e .The -e flag installs the package in editable mode, allowing you to make changes to the code without reinstalling it. The --group dev part installs additional dependencies needed for development, such as testing and linting tools.
-
Create a Branch: Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make Changes: Implement your changes in the appropriate files. Ensure that all public functions and classes have clear and concise docstrings.
-
Update Documentation: Update or add documentation to reflect your changes. This includes updating README files, docstrings, and any relevant guides.
When AI coding assistants are used to generate or substantially modify code, the GuideLLM project requires that you add one of the following trailers to the git commit message:
Generated-by: <name of the AI coding assistant>: when the code in the commit was generated primarily by an AI coding assistant.Assisted-by: <name of the AI coding assistant>: when the commit includes substantial code created or modified by the AI coding assistant.
For example:
This is the commit summary.
Details of the changes made in this commit.
Generated-by: Cursor
Signed-off-by: John Doe <john.doe@example.com>You can optionally add the LLM model name after the name of the AI coding assistant, separated by a space.
For example:
Generated-by: Cursor claude-4.6-sonnet
Assisted-by: GitHub Copilot gpt-4oShared Agent Skills live under .agents/skills/ (the cross-client convention). Cursor loads that path natively; Claude Code follows the tracked .claude/skills symlink to the same directory.
| Skill | Purpose |
|---|---|
guidellm-weekly-summary |
Generate an externally shareable nested-list summary of GuideLLM GitHub activity for the past week (scripts/fetch_activity.sh gathers PR/issue JSON via gh) |
Ask for a weekly summary, team activity update, or status digest of GuideLLM to invoke it. Requires the gh CLI authenticated for vllm-project/guidellm.
We use Tox to simplify running various tasks in isolated environments. Tox standardizes environments to ensure consistency across local development, CI/CD pipelines, and releases. This guarantees that the code behaves the same regardless of where it is executed.
Additionally, to ensure consistency and quality of the codebase, we use ruff for linting and styling, mypy for type checking, and mdformat for formatting Markdown files.
To check code quality, including linting and formatting:
tox -e lint-checkTo automatically fix style issues:
tox -e lint-fixTo ensure type safety using Mypy:
tox -e type-checkTo ensure valid links added to the documentation / Markdown files:
tox -e link-checkWe use pre-commit to automate quality checks before commits. Pre-commit hooks run checks like linting, formatting, and type checking, ensuring that only high-quality code is committed.
To install the pre-commit hooks, run:
pre-commit installThis will set up the hooks to run automatically before each commit. To manually run the hooks on all files, use:
pre-commit run --all-filesFor testing, we use pytest as our testing framework. We have different test suites for unit tests, integration tests, and end-to-end tests. To run the tests, you can use Tox, which will automatically create isolated environments for each test suite. Tox will also ensure that the tests are run in a consistent environment, regardless of where they are executed.
To run all tests:
tox-
Unit tests (focused on individual components with mocking):
tox -e test-unit
-
Integration tests (focused on interactions between components ideally without mocking):
tox -e test-integration
-
End-to-end tests (focused on the entire system and user interfaces):
tox -e test-e2e
To ensure your changes are covered by tests, run:
tox -e test-unit -- --cov=guidellm --cov-report=htmlReview the coverage report to confirm that your new code is adequately tested.
-
Push Changes: Push your branch to your forked repository (if you forked):
git push origin feature/your-feature-name
-
Open a Pull Request: Go to the original repository and open a pull request. Use the following template for your pull request description:
# Title; ex: Add feature X to improve Y ## Summary: Short paragraph detailing the pull request changes and reasoning in addition to any relevant context. ## Details: - Detailed list of changes made in the pull request ## Test Plan: - Detailed list of steps to test the changes made in the pull request ## Related Issues - List of related issues or other pull requests; ex: "Fixes #1234"
-
Address Feedback: Respond to any feedback from reviewers and make necessary changes.
Logging is useful for learning how GuideLLM works and finding problems.
Logging is set using the following environment variables:
GUIDELLM__LOGGING__DISABLED: Disable logging (default: false).GUIDELLM__LOGGING__CLEAR_LOGGERS: Clear existing loggers from loguru (default: true).GUIDELLM__LOGGING__CONSOLE_LOG_LEVEL: Log level for console logging (default: none, options: DEBUG, INFO, WARNING, ERROR, CRITICAL).GUIDELLM__LOGGING__LOG_FILE: Path to the log file for file logging (default: guidellm.log if log file level set else none)GUIDELLM__LOGGING__LOG_FILE_LEVEL: Log level for file logging (default: INFO if log file set else none).
If logging isn't responding to the environment variables, run the guidellm env command to validate that the environment variables match and are being set correctly.
Examples:
Enable verbose console output for a single run. The interactive progress display can overwrite console log lines, so --disable-progress is recommended when reading console logs:
GUIDELLM__LOGGING__CONSOLE_LOG_LEVEL=DEBUG guidellm run ... --disable-progressWrite structured DEBUG logs to a file while leaving the console at its default level:
GUIDELLM__LOGGING__LOG_FILE=guidellm.log GUIDELLM__LOGGING__LOG_FILE_LEVEL=DEBUG guidellm run ...- CONTRIBUTING.md: Guidelines for contributing to the project.
- CODE_OF_CONDUCT.md: Our expectations for community behavior.
- tox.ini: Configuration for Tox environments.
- .pre-commit-config.yaml: Configuration for pre-commit hooks.