-
Notifications
You must be signed in to change notification settings - Fork 11
Feat: migrate to uv from pip #75
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
base: main
Are you sure you want to change the base?
Conversation
…cuda-dl-base as required pytorch dependencies like libcusparselt0 was missing
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.
Copilot reviewed 15 out of 21 changed files in this pull request and generated no comments.
Files not reviewed (6)
- notebooks/.devcontainer/Dockerfile: Language not supported
- notebooks/.devcontainer/requirements.txt: Language not supported
- requirements-dev.txt: Language not supported
- src/sample_cpu_project/.devcontainer/Dockerfile: Language not supported
- src/sample_pytorch_gpu_project/.devcontainer/Dockerfile: Language not supported
- src/sample_pytorch_gpu_project/.devcontainer/requirements.txt: Language not supported
Comments suppressed due to low confidence (4)
src/sample_pytorch_gpu_project/.devcontainer/pyproject.toml:2
- [nitpick] The 'name' field is empty; consider providing a descriptive project name for clarity in the GPU project configuration.
name = ""
src/sample_cpu_project/.devcontainer/pyproject.toml:2
- [nitpick] The 'name' field is empty; a meaningful project name can help differentiate configurations in the CPU project settings.
name = ""
notebooks/.devcontainer/pyproject.toml:2
- [nitpick] The project name is not specified; consider adding a descriptive name for better clarity in the notebooks environment.
name = ""
src/sample_pytorch_gpu_project/README.md:137
- [nitpick] The placeholder version 'x.x.x' for mlflow may be unclear to users; consider using a valid version or indicating explicitly that it is a placeholder.
mlflow==x.x.x
meciwo
left a comment
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.
Reviewed all files. It looks good to me except src/common/requirements.txt
As you mentioned
This part can be potentially improved by https://docs.astral.sh/uv/concepts/projects/workspaces/#when-not-to-use-workspaces to move away from requirements.txt and gets its own lock file
What about trying to use workspaces?
Purpose
This PR switches the package management system from pip to uv. uv is a new package manager that is way faster and than pip.
uv is built in Rust, enabling it to outperform pip significantly. Benchmarks indicate that uv runs way faster than pip (https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md). This speed is achieved through parallel downloads, efficient caching mechanisms, and by downloading only necessary metadata instead of entire package files.
Unlike pip, uv uses a lockfile (uv.lock) alongside pyproject.toml to ensure consistent and reproducible installations across different environments. This approach minimizes dependency conflicts and enhances reliability, similar to the functionality provided by tools like Poetry.
To support this switch, the following code changes were made:
uv.lockdependabot/dependabot-core#10478 (comment) for the last few months. Major issues seem to be resolved now so I'll check if it's working alright once the next update is made by dependabot for uv in this repo on May 1st.Does this introduce a breaking change?
Author pre-publish checklist
Pull Request Type
What kind of change does this Pull Request introduce?