Skip to content
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

Try uv for package management (245ms project installation) #281

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

vwxyzjn
Copy link
Collaborator

@vwxyzjn vwxyzjn commented Aug 22, 2024

Still playing with it.

Installation takes 245ms vs the typical 2-5 mins with pip. It also has many other additional benefits. For example, it locks the entire dependency tree, so there is always a reproducible build, so things like #246 would not happen unless we specifically decided to bump dependency.

image

With the current requirements.txt there is no dependency locking, so the dependencies may be different in just a couple of days. E.g.., the dependency difference in the image below comes from

image

Some speed tests:

uv sync with caches: takes 235ms to install the whole open instruct project and then 10ms to install flash attention

Screen.Recording.2024-08-22.at.10.09.16.AM.mov

uv sync without caches: takes ~90 seconds (mostly download time; if done in the server, it should much much faster due to parallel download) to install the whole open instruct project and then 10 seconds to install flash attention

Screen.Recording.2024-08-22.at.10.06.23.AM.mov

** requirements.txt caches: takes about 2 mins

https://youtu.be/BLYBx5gCWqA

** requirements.txt without caches: takes about 4 mins

https://youtu.be/z0VdT29wb6E

@vwxyzjn vwxyzjn changed the title Try uv for package management (6ms project installation) Try uv for package management (245ms project installation) Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant