Skip to content

Conversation

@ryan-williams
Copy link
Contributor

@ryan-williams ryan-williams commented Dec 17, 2024

Factored some classes/functions from pytorch.py into their own files:

  • dataset.py: ExperimentAxisQueryIterableDataset
  • datapipe.py: ExperimentAxisQueryIterDataPipe
  • dataloader.py: experiment_dataloader wrapper
  • _csr.py: CSR_IO_Buffer
  • _distributed.py: multiprocess world/rank helpers
  • _experiment_locator.py: ExperimentLocator
  • _utils: splits, batched

The code is unchanged

Some test_pytorch.py tests are similarly moved to files named after the above new files. Pytest @fixtures are also moved to conftest.py (for reuse across test files), and tests/_utils.py contains generic test helper functions.

b03c65f renamed these type aliases:

-XDatum = Union[NDArrayNumber, sparse.csr_matrix]
-XObsDatum = Tuple[XDatum, pd.DataFrame]
+XBatch = Union[NDArrayNumber, sparse.csr_matrix]
+Batch = Tuple[XBatch, pd.DataFrame]

Also a couple nits in 16a6090

@ryan-williams ryan-williams marked this pull request as ready for review December 17, 2024 15:43
)
from .dataloader import experiment_dataloader
from .datapipe import ExperimentAxisQueryIterDataPipe
from .dataset import ExperimentAxisQueryIterableDataset
Copy link
Member

Choose a reason for hiding this comment

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

do you need to define __all__?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's down at L14, unchanged

@ryan-williams ryan-williams merged commit 68a8fa2 into main Dec 17, 2024
24 checks passed
@ryan-williams ryan-williams deleted the rw/files branch December 17, 2024 19:48
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.

3 participants