Skip to content

[cherry-pick] sharing -> sharding (#1787) #1788

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

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/source/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ torchtext.datasets
- All workers (DDP workers *and* DataLoader workers) see a different part
of the data. The datasets are already wrapped inside `ShardingFilter
<https://pytorch.org/data/main/generated/torchdata.datapipes.iter.ShardingFilter.html>`_
and you may need to call ``dp.apply_sharing(num_shards, shard_id)`` in order to shard the
and you may need to call ``dp.apply_sharding(num_shards, shard_id)`` in order to shard the
data across ranks (DDP workers) and DataLoader workers. One way to do this
is to create ``worker_init_fn`` that calls ``apply_sharding`` with appropriate
number of shards (DDP workers * DataLoader workers) and shard id (inferred through rank
Expand Down