-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Refactor nightly pull tool to use venv and pip
#141281
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/141281
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit d45448f with merge base 740d1eb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Example output: ```console $ python3.12 tools/nightly.py checkout -b my-nightly-branch -p my-env --python python3.10 log file: /Users/PanXuehai/Projects/pytorch/nightly/log/2024-11-22_04h15m45s_63f8b29e-a845-11ef-bbf9-32c784498a7b/nightly.log Creating virtual environment Creating venv (Python 3.10.15): /Users/PanXuehai/Projects/pytorch/my-env Installing packages Upgrading package(s) (https://download.pytorch.org/whl/nightly/cpu): pip, setuptools, wheel Installing packages took 5.576 [s] Creating virtual environment took 9.505 [s] Downloading packages Downloading package(s) (https://download.pytorch.org/whl/nightly/cpu): torch Downloaded 9 file(s) to /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/pip-download-lty5dvz4: - mpmath-1.3.0-py3-none-any.whl - torch-2.6.0.dev20241121-cp310-none-macosx_11_0_arm64.whl - jinja2-3.1.4-py3-none-any.whl - sympy-1.13.1-py3-none-any.whl - MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl - networkx-3.4.2-py3-none-any.whl - fsspec-2024.10.0-py3-none-any.whl - filelock-3.16.1-py3-none-any.whl - typing_extensions-4.12.2-py3-none-any.whl Downloading packages took 7.628 [s] Installing dependencies Installing packages Installing package(s) (https://download.pytorch.org/whl/nightly/cpu): numpy, cmake, ninja, packaging, ruff, mypy, pytest, hypothesis, ipython, rich, clang-format, clang-tidy, sphinx, mpmath-1.3.0-py3-none-any.whl, jinja2-3.1.4-py3-none-any.whl, sympy-1.13.1-py3-none-any.whl, MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl, networkx-3.4.2-py3-none-any.whl, fsspec-2024.10.0-py3-none-any.whl, filelock-3.16.1-py3-none-any.whl, typing_extensions-4.12.2-py3-none-any.whl Installing packages took 42.514 [s] Installing dependencies took 42.515 [s] Unpacking wheel file Unpacking wheel file took 3.223 [s] Checking out nightly PyTorch Found released git version ac47a2d Found nightly release version e0482fd Switched to a new branch 'my-nightly-branch' Checking out nightly PyTorch took 0.198 [s] Moving nightly files into repo Linking /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/wheel-dljxil5i/torch-2.6.0.dev20241121/torch/_C.cpython-310-darwin.so -> /Users/PanXuehai/Projects/pytorch/torch/_C.cpython-310-darwin.so Linking /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/wheel-dljxil5i/torch-2.6.0.dev20241121/torch/lib/libtorch_python.dylib -> /Users/PanXuehai/Projects/pytorch/torch/lib/libtorch_python.dylib ... Linking /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/wheel-dljxil5i/torch-2.6.0.dev20241121/torch/include/c10/macros/Macros.h -> /Users/PanXuehai/Projects/pytorch/torch/include/c10/macros/Macros.h Moving nightly files into repo took 11.426 [s] Writing pytorch-nightly.pth Writing pytorch-nightly.pth took 0.036 [s] ------- PyTorch Development Environment set up! Please activate to enable this environment: $ source /Users/PanXuehai/Projects/pytorch/my-env/bin/activate ``` ghstack-source-id: 4984a02 Pull Request resolved: pytorch#141281
|
Why not just use uv as it will be way faster? Is it missing some functionality? |
Yes, it is missing the alternative for $ uv pip download
error: unrecognized subcommand 'download'
Usage: uv pip [OPTIONS] <COMMAND>
For more information, try '--help'. |
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.
LGTM, tried this out on my dev machine and it works as expected. Thanks!
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Resolves pytorch#141238 - pytorch#141238 Example output: ```console $ python3.12 tools/nightly.py checkout -b my-nightly-branch -p my-env --python python3.10 log file: /Users/PanXuehai/Projects/pytorch/nightly/log/2024-11-22_04h15m45s_63f8b29e-a845-11ef-bbf9-32c784498a7b/nightly.log Creating virtual environment Creating venv (Python 3.10.15): /Users/PanXuehai/Projects/pytorch/my-env Installing packages Upgrading package(s) (https://download.pytorch.org/whl/nightly/cpu): pip, setuptools, wheel Installing packages took 5.576 [s] Creating virtual environment took 9.505 [s] Downloading packages Downloading package(s) (https://download.pytorch.org/whl/nightly/cpu): torch Downloaded 9 file(s) to /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/pip-download-lty5dvz4: - mpmath-1.3.0-py3-none-any.whl - torch-2.6.0.dev20241121-cp310-none-macosx_11_0_arm64.whl - jinja2-3.1.4-py3-none-any.whl - sympy-1.13.1-py3-none-any.whl - MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl - networkx-3.4.2-py3-none-any.whl - fsspec-2024.10.0-py3-none-any.whl - filelock-3.16.1-py3-none-any.whl - typing_extensions-4.12.2-py3-none-any.whl Downloading packages took 7.628 [s] Installing dependencies Installing packages Installing package(s) (https://download.pytorch.org/whl/nightly/cpu): numpy, cmake, ninja, packaging, ruff, mypy, pytest, hypothesis, ipython, rich, clang-format, clang-tidy, sphinx, mpmath-1.3.0-py3-none-any.whl, jinja2-3.1.4-py3-none-any.whl, sympy-1.13.1-py3-none-any.whl, MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl, networkx-3.4.2-py3-none-any.whl, fsspec-2024.10.0-py3-none-any.whl, filelock-3.16.1-py3-none-any.whl, typing_extensions-4.12.2-py3-none-any.whl Installing packages took 42.514 [s] Installing dependencies took 42.515 [s] Unpacking wheel file Unpacking wheel file took 3.223 [s] Checking out nightly PyTorch Found released git version ac47a2d Found nightly release version e0482fd Switched to a new branch 'my-nightly-branch' Checking out nightly PyTorch took 0.198 [s] Moving nightly files into repo Linking /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/wheel-dljxil5i/torch-2.6.0.dev20241121/torch/_C.cpython-310-darwin.so -> /Users/PanXuehai/Projects/pytorch/torch/_C.cpython-310-darwin.so Linking /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/wheel-dljxil5i/torch-2.6.0.dev20241121/torch/lib/libtorch_python.dylib -> /Users/PanXuehai/Projects/pytorch/torch/lib/libtorch_python.dylib ... Linking /var/folders/sq/7sf73d5s2qnb3w6jjsmhsw3h0000gn/T/wheel-dljxil5i/torch-2.6.0.dev20241121/torch/include/c10/macros/Macros.h -> /Users/PanXuehai/Projects/pytorch/torch/include/c10/macros/Macros.h Moving nightly files into repo took 11.426 [s] Writing pytorch-nightly.pth Writing pytorch-nightly.pth took 0.036 [s] ------- PyTorch Development Environment set up! Please activate to enable this environment: $ source /Users/PanXuehai/Projects/pytorch/my-env/bin/activate ``` Pull Request resolved: pytorch#141281 Approved by: https://github.com/seemethere
Stack from ghstack (oldest at bottom):
venvandpip#141281Resolves #141238
cc @atalman @seemethere @malfet
Example output: