Install particular pytorch nightly

Hi there,

I need to use a nightly build of pytorch because the stable release has a compilation bug.

Now I have tested everything with the latest nightly build, but I’m afraid that something will break with a later one and I won’t notice. Is there any way to pin my software to a specific nightly build? I noticed that only the latest nightly is available in the conda channel.

Best,
Thorsten

1 Like

I’m unsure how the conda nightly channel is used currently, but you can manually download the corresponding nightly pip wheels and install it locally.

Something like this should work pip3 install torch==2.1.0.dev20230814+cu118 --index-url https://download.pytorch.org/whl/nightly/cu118

So feel free to put in the version, date and cuda version you need, you can check and see if you can conda install the wheels directly from the index file I provided

When I try to install pip install "torch==2.2.0.dev20231015+cu121" --index-url https://download .pytorch.org/whl/nightly/cu121, I got the following error:

ERROR: Could not find a version that satisfies the requirement torch==2.2.0.dev20231015+cu121 (from versions: 2.2.0.dev20231010+cu121, 2.3.0.dev20240117+cu121, 2.3.0.dev20240118+cu121, 2.3.0.dev20240119+cu121, 2.3.0.dev20240120+cu121, 2.3.0.dev20240121+cu121, 2.3.0.dev20240122+cu121, 2.3.0.dev20240123+cu121, 2.3.0.dev20240124+cu121, 2.3.0.dev20240125+cu121, 2.3.0.dev20240126+cu121, 2.3.0.dev20240127+cu121, 2.3.0.dev20240128+cu121, 2.3.0.dev20240129+cu121, 2.3.0.dev20240130+cu121, 2.3.0.dev20240131+cu121, 2.3.0.dev20240201+cu121, 2.3.0.dev20240202+cu121, 2.3.0.dev20240203+cu121, 2.3.0.dev20240204+cu121, 2.3.0.dev20240205+cu121, 2.3.0.dev20240206+cu121, 2.3.0.dev20240207+cu121, 2.3.0.dev20240208+cu121, 2.3.0.dev20240209+cu121, 2.3.0.dev20240210+cu121, 2.3.0.dev20240211+cu121, 2.3.0.dev20240212+cu121, 2.3.0.dev20240213+cu121, 2.3.0.dev20240214+cu121, 2.3.0.dev20240215+cu121, 2.3.0.dev20240216+cu121, 2.3.0.dev20240217+cu121, 2.3.0.dev20240218+cu121, 2.3.0.dev20240219+cu121, 2.3.0.dev20240220+cu121, 2.3.0.dev20240221+cu121, 2.3.0.dev20240222+cu121, 2.3.0.dev20240223+cu121, 2.3.0.dev20240224+cu121, 2.3.0.dev20240225+cu121, 2.3.0.dev20240226+cu121, 2.3.0.dev20240227+cu121, 2.3.0.dev20240228+cu121, 2.3.0.dev20240229+cu121, 2.3.0.dev20240301+cu121, 2.3.0.dev20240302+cu121, 2.3.0.dev20240303+cu121, 2.3.0.dev20240304+cu121, 2.3.0.dev20240305+cu121, 2.3.0.dev20240306+cu121, 2.3.0.dev20240307+cu121, 2.3.0.dev20240308+cu121, 2.3.0.dev20240309+cu121, 2.3.0.dev20240310+cu121, 2.3.0.dev20240311+cu121, 2.3.0.dev20240312+cu121, 2.3.0.dev20240313+cu121, 2.3.0.dev20240314+cu121, 2.3.0.dev20240315+cu121, 2.4.0.dev20240316+cu121)

It seems only one nightly build for 2.2.0 (2.2.0.dev20231010+cu121) is available, while the rest are gone. How do I search for other nightly binaries in 2.2.0?

Check this post. For your wheel, this should work:

curl -OL https://download.pytorch.org/whl/nightly/cu121/torch-2.2.0.dev20231015%2Bcu121-cp310-cp310-linux_x86_64.whl

Can we somehow list the wheels that can be downloaded? That would greatly help!

In addition, how do package dependencies work then? e.g. is the corresponding torch-triton included in the wheel?

Okay, here is the magic:

pip install https://download.pytorch.org/whl/nightly/pytorch_triton-2.1.0%2B6e4932cda8-cp39-cp39-linux_x86_64.whl
pip install https://download.pytorch.org/whl/nightly/cu121/torch-2.2.0.dev20231015%2Bcu121-cp39-cp39-linux_x86_64.whl
# verify basic cuda functionality
python -c "import torch; print(torch.randn(5, 5, 5).cuda().sum())"
# verify pt2 stack
python -c "import torch; print(torch.compile(lambda x: x + 1)(torch.randn(5, 5, 5).cuda()).sum())"

With this, I can install previous nightly version now. Just need to try many urls manually :slight_smile:

In case anyone is interested, I created a script to spell out all the available urls: GitHub - youkaichao/list_pytorch_nightly: List recently available pytorch nightly version, for every day .

2 Likes