pytorch / pytorch/tutorials

torchrec tutorial: old cuda version install

Open
#3,713 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

torchrec
Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

https://github.com/pytorch/tutorials/blob/a3695df13baac449f92a06b1029260a21f2e5c90/intermediate_source/torchrec_intro_tutorial.py#L38C1-L43C3

the current lines try to install a cuda 12.1 version when the current colab is 12.6 (and so torch remains at 12.6)
changing the index to cu126 fails, because torchrec requires tensordict, which is not in the index?

my proposed solution is to remove the pytorch install line
and add tensordict to torchmetrics line

# !pip3 install --pre torch --index-url https://download.pytorch.org/whl/cu121 -U remove
!pip3 install fbgemm_gpu --index-url https://download.pytorch.org/whl/cu126
!pip3 install torchmetrics==1.0.3 tensordict
!pip3 install torchrec --index-url https://download.pytorch.org/whl/cu126

cc @PaulZhang12 @iamzainhuda @vmoens @nairbv

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with intermediate_source/torchrec_intro_tutorial.py at lines 38-43 and reproduce the installation in the current Colab environment. Check whether the proposed package and index changes install compatible torchrec dependencies, then run the tutorial far enough to confirm the setup completes without the CUDA-version mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
documentation, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.