Skip to content
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 work toward PyTorch data loaders #1

Open
wants to merge 67 commits into
base: main
Choose a base branch
from
Open

Conversation

bkmartinjr
Copy link
Member

@bkmartinjr bkmartinjr commented Sep 19, 2024

Notes to reviewers:

  • APIs have changed from the CZI contribution. The demo notebook (tutorial_pytorch.ipynb) has been updated to run with all API modifications.
  • This PR is for an initial drop we plan to use for pre-release feedback. More work is required prior to release
  • This is set up as a separate Python package, with its own config/build/etc.

This PR contains a PyTorch iterable-style DataSet/DataPipe for use with SOMA Experiment. Initial code contributed by the Chan Zuckerberg single-cell team. Modifications to the original code include:

  • stand-alone Python package tiledbsoma_ml
  • significant refactoring to improve performance
  • multi-worker/multi-GPU support - should work with DDP, DataLoader and Lightning
  • CI and other config for stand-alone Python package
  • improved context/config handling - pass through all user-specified configuration allowing use with other storage solutions, AWS multi-region, etc.
  • fix lint and typing issues identified by the CI pipeline in this repo
  • update doctrings and copyright
  • some minor enhancements to unit tests
  • added torch.utils.data.IterableDataset alongside the existing torchdata.datapipes.iter.IterDataPipe, acknowledging that the torchdata.datapipes is deprecated and slated for removal
  • add Python 3.8 support
  • API refinement to better align with ExperimentAxisQuey
  • fix RNG state handling which caused incorrect results when shuffle=True

API change summary:

  • constructor takes ExperimentAxisQuery, rather than than an Experiment
  • reworked I/O and shuffle chunk size param for better API UX
  • added "set_epoch" endpoint to allow distributed shuffle

* add minimum version for several dependencies

* add compat test for primary dependencies

* fix typo in workflow

* fix another typo

* compat matrix refinement

* fix quoting

* refine compat test matrix

* further simplify matrix

* update changelog to use correct links (#3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants