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

Closed
wants to merge 71 commits into from
Closed

Conversation

bkmartinjr
Copy link
Member

@bkmartinjr bkmartinjr commented Sep 19, 2024

This PR is replaced by a set of smaller PRs, #4, #5, #6, #7, #8, #9, #10, #11, #12 and #13. Please ignore this PR - it will close it when the refactoring is complete.


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)
@bkmartinjr bkmartinjr marked this pull request as draft September 23, 2024 15:13
@bkmartinjr
Copy link
Member Author

Reverting to draft. I'm going to try and break this thing up into more digestible chunks for review.

@bkmartinjr bkmartinjr closed this Oct 15, 2024
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