-
Notifications
You must be signed in to change notification settings - Fork 1.5k
create uv-based installation, package management and venv #92
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
|
Ah beaten to the punch - I was going to submit this PR. uv has thankfully very quickly become the standard, especially in AI projects. Strongly recommend adopting it and merging this PR |
|
@aviadr1 found 3 issues: the README still has the old pip based installation instructions. The branch is labeled poetry which is confusing. and errors out on triton:
|
|
just an fyi, your specification of python >= 3.12 is incompatible with the rest of the dependency versions. requires-python = "==3.10.*" allows a uv sync to proceed without error and matches the recommendations of the repo. Thanks! Alan |
|
But does python actually need to be 3.10 for this repo? Or instead should the other dependencies be updated to versions that work with >=3.12 ? |
|
Yeah, that's not my call, I'm just getting it to work with the git specs. Also you'll need to add setuptools to the dependancies list. But once those two changes are made the sample scripts run without issue. It's really nice, uv sync followed by uv run run_csm.py is all you need. |
|
@ZackHodari would you mind confirming if python version== 3.10 is required? or is >= 3.10 ok? Or better yet, any reason not to update to >= 3.12? |
|
I would love for us to land this PR, uv is cool. However, we will only provide one recommended install method, so we'd need to make sure the approach works and brings benefit to users before deprecating the I feel a big contribution in this pr is cross-platform support. Is there a reason we can't do this with On the question of python version, it all comes down to testing. We only tested with 3.10, the ideal situation is we don't need to change requirements, but if you test install and |
Can you please provide more details on the setup tools you used |
This PR provides the project with a new
uv-based dependency management system. The changes include:What is uv and why is it important?
uvis a modern dependency manager for python that centralizes project metadata in a pyproject.toml file and generates a uv.lock file for reproducible installs, simplifying dependency tracking and environment setup.Solves:
uv add --editable git+https://github.com/SesameAILabs/csm@master#egg=csmFor more details, check out uv
Usage:
uvif you dont have it https://github.com/astral-sh/uv?tab=readme-ov-file#installationuv syncto install everything you need for csm and get runninguv run python example.pyto run a code with csmThese updates aim to improve dependency management and overall developer experience.
.python-version:A new file is added to specify the Python version (3.12), ensuring that the correct interpreter is used across development environments.
pyproject.toml:The project metadata is now centralized in a pyproject.toml file following PEP 621 standards. This file defines the project name, version, description, required Python version, and a list of dependencies (including conditional dependencies for platforms such as Linux and Windows).
uv.lock:A lockfile is generated to capture the resolved state of all dependencies. This ensures reproducible installs and consistent environments regardless of external package updates.
These changes will enable better dependency resolution, reproducibility, and improved management of the project’s virtual environment through uv.