Skip to content

WIP Removing references to installing PyTorch via Conda #3349

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3c0a8e5
Move back to 2.7
svekars Apr 29, 2025
a66f05e
Update
svekars Apr 29, 2025
e00d84e
Update
svekars Apr 29, 2025
0c465f2
Update
svekars Apr 29, 2025
22302ec
Update
svekars Apr 29, 2025
d8f60ea
Update
svekars Apr 29, 2025
6071c56
Update
svekars Apr 29, 2025
65bd04a
Update
svekars Apr 29, 2025
9ef0ab8
Update
svekars Apr 30, 2025
9d04749
Update
svekars Apr 30, 2025
536135e
Update
svekars Apr 30, 2025
ea13112
Update
svekars Apr 30, 2025
db6dbd5
Update
svekars Apr 30, 2025
19006b3
Update
svekars Apr 30, 2025
7dcb0fe
Update
svekars Apr 30, 2025
bfd652e
Update
svekars Apr 30, 2025
34b91c9
Update
svekars Apr 30, 2025
ffab05c
Update
svekars Apr 30, 2025
c7b3aee
Update
svekars Apr 30, 2025
91b93f1
Update
svekars Apr 30, 2025
f3bc0ca
Update
svekars Apr 30, 2025
fe0bf00
Update
svekars Apr 30, 2025
4cb2f59
Update
svekars Apr 30, 2025
27295ea
Update
svekars May 1, 2025
e5e95fc
Removing Conda install references.
AlannaBurke May 1, 2025
3bd2b22
Removing Conda install references.
AlannaBurke May 1, 2025
1257ab1
Removing Conda install references.
AlannaBurke May 1, 2025
9d49d11
Removing Conda install references.
AlannaBurke May 1, 2025
1d59f85
Removing Conda install references.
AlannaBurke May 1, 2025
1588c5e
Removing Conda install references.
AlannaBurke May 1, 2025
78f9670
Removing Conda install references.
AlannaBurke May 1, 2025
19319ae
Merge branch 'main' into remove-conda
svekars May 2, 2025
3f98763
Removing formatting issues.
AlannaBurke May 6, 2025
9d24377
Merge branch 'remove-conda' of github.com:pytorch/tutorials into remo…
AlannaBurke May 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions advanced_source/sharding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ Requirements: - python >= 3.7
We highly recommend CUDA when using torchRec. If using CUDA: - cuda >=
11.0

.. Should these be updated?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be updated?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lines 26-29 need to be removed.

.. code:: python

# install conda to make installying pytorch with cudatoolkit 11.3 easier.
# install conda to make installying pytorch with cudatoolkit 11.3 easier.
!sudo rm Miniconda3-py37_4.9.2-Linux-x86_64.sh Miniconda3-py37_4.9.2-Linux-x86_64.sh.*
!sudo wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh
!sudo chmod +x Miniconda3-py37_4.9.2-Linux-x86_64.sh
!sudo bash ./Miniconda3-py37_4.9.2-Linux-x86_64.sh -b -f -p /usr/local

.. code:: python

# install pytorch with cudatoolkit 11.3
!sudo conda install pytorch cudatoolkit=11.3 -c pytorch-nightly -y

Installing torchRec will also install
`FBGEMM <https://github.com/pytorch/fbgemm>`__, a collection of CUDA
Expand Down Expand Up @@ -213,7 +210,7 @@ embedding table placement using planner and generate sharded model using
)
sharders = [cast(ModuleSharder[torch.nn.Module], EmbeddingBagCollectionSharder())]
plan: ShardingPlan = planner.collective_plan(module, sharders, pg)

sharded_model = DistributedModelParallel(
module,
env=ShardingEnv.from_process_group(pg),
Expand All @@ -234,7 +231,7 @@ ranks.
.. code:: python

import multiprocess

def spmd_sharing_simulation(
sharding_type: ShardingType = ShardingType.TABLE_WISE,
world_size = 2,
Expand All @@ -254,7 +251,7 @@ ranks.
)
p.start()
processes.append(p)

for p in processes:
p.join()
assert 0 == p.exitcode
Expand Down Expand Up @@ -333,4 +330,3 @@ With data parallel, we will repeat the tables for all devices.

rank:0,sharding plan: {'': {'large_table_0': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None), 'large_table_1': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None), 'small_table_0': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None), 'small_table_1': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None)}}
rank:1,sharding plan: {'': {'large_table_0': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None), 'large_table_1': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None), 'small_table_0': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None), 'small_table_1': ParameterSharding(sharding_type='data_parallel', compute_kernel='batched_dense', ranks=[0, 1], sharding_spec=None)}}

2 changes: 2 additions & 0 deletions advanced_source/torch_script_custom_ops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ Environment setup
We need an installation of PyTorch and OpenCV. The easiest and most platform
independent way to get both is to via Conda::

.. these need to be updated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs an update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to pip install


conda install -c pytorch pytorch
conda install opencv

Expand Down
4 changes: 2 additions & 2 deletions beginner_source/colab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PyTorch Version in Google Colab
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wen you are running a tutorial that requires a version of PyTorch that has
just been released, that version might not be yet available in Google Colab.
jst been released, that version might not be yet available in Google Colab.
To check that you have the required ``torch`` and compatible domain libraries
installed, run ``!pip list``.

Expand All @@ -27,7 +27,7 @@ Using Tutorial Data from Google Drive in Colab
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We've added a new feature to tutorials that allows users to open the
notebook associated with a tutorial in Google Colab. You may need to
ntebook associated with a tutorial in Google Colab. You may need to
copy data to your Google drive account to get the more complex tutorials
to work.

Expand Down
Loading