-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial steps toward a torch.utils.data.IterableDataset (PR 3 of N) #6
Conversation
1cb7db7
to
54ae565
Compare
4a546ca
to
c0f32a1
Compare
(to enable testing on #6)
* add GHA workflows; remove temp exclusion from pre-commit config * GHA tweak, attempt to trigger PR runs --------- Co-authored-by: Ryan Williams <ryan.williams@tiledb.com>
c0f32a1
to
d9c0ef4
Compare
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.
Most of the way through, couple q's here, and suggested changes in #15!
src/tiledbsoma_ml/pytorch.py
Outdated
assert self._var_joinids is not None | ||
world_size, _ = _get_distributed_world_rank() | ||
n_workers, _ = _get_worker_world_rank() | ||
partition_len = len(self._obs_joinids) // world_size // n_workers |
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.
Will some partitions be one greater than others, if this division has remainders? Does it matter?
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.
Yes, they can vary across data loader workers. And it doesn't really matter. What matters the most is having the same number of samples distributed to each GPU. Beyond that, things are data and config dependent.
cd51799
to
579727a
Compare
…rse_output__batched`
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.
🎉
This PR adds a simple
torch.utils.data.IterableDataset
andtorchdata.datapipes.iter.IterDataPipe
implementation. An initial set of tests is included.Notes to reviewer:
torch.distributed
variants of world and rank.dataloader
convenience API - that will come in a later PR