-
Notifications
You must be signed in to change notification settings - Fork 103
Migrating to UV for Dependency #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This work-in-progress pull request migrates the project's dependency management from pip/setuptools to uv, a modern Python package manager. The changes eliminate traditional setup files in favor of uv's project management approach and update all Modal container image configurations to use uv for dependency installation.
- Removes setup.py and requirements.txt files, transitioning to uv-based dependency management
- Updates all Modal image configurations to use
.uv_sync()instead of.pip_install_from_requirements() - Updates README documentation with uv installation instructions and command examples using
uv run python
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Completely removed as part of migration to uv-based project structure |
| requirements.txt | Completely removed; dependencies now managed via pyproject.toml and uv.lock |
| scripts/run_and_check.py | Updated Modal image to use uv_sync for dependency installation |
| scripts/generate_baseline_time_modal.py | Updated Modal image to use uv_sync for dependency installation |
| scripts/generate_and_eval_single_sample_modal.py | Updated Modal image to use uv_sync for dependency installation |
| scripts/eval_from_generations.py | Updated Modal image to use uv_sync for dependency installation |
| README.md | Updated setup instructions for uv, added bash syntax highlighting, and updated all command examples to use uv run python |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
README.md
Outdated
| ## 🔧 Set up | ||
| ``` | ||
| conda create --name kernel-bench python=3.10 | ||
| conda activate kernel-bench | ||
| pip install -r requirements.txt | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if you haven't already |
Copilot
AI
Dec 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation instructions are incomplete. After installing uv, users need guidance on how to actually set up the project dependencies. The instructions should mention running a command like 'uv sync' or 'uv install' to install the project dependencies defined in the pyproject.toml file before they can run any scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree let's have a clear pyproject.toml that clarify what needs to be installed (as a single source of truth)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks to @PaliC and @alexzhang13 for advocating the benefits of uv. We’ve migrated KernelBench to uv-based dependency management, which simplifies environment setup and improves reproducibility. This is particularly helpful since KernelBench is often used as a sub-dependency within larger projects; uv makes it easier to manage nested dependency resolution and versioning in those workflows. The migration has been validated locally and on Modal. For compatibility, the previous setup using conda and requirements.txt is still supported as a fallback. |
This pull request transitions the project to use
pyproject.tomland theuvtool for modern Python dependency and environment management, replacing the previous reliance onrequirements.txt,pip, andsetup.py. It updates documentation and scripts to reflect the new workflow, and removes the legacysetup.pyfile.Testing:
Modal was tested by using
uv run python scripts/generate_and_eval_single_sample_modal.py dataset_sr c=c=huggingface level=2 problem_id=40 server_type=google model_name=gemini/gemini-2.5-flashotherwise, functionality was tested by using the commands in the readme.Update: modal and local evaluation still work with the new UV-based system. Modal exhibits a cache hit on the image with UV-based package management which is great for evaluation speed.