-
Notifications
You must be signed in to change notification settings - Fork 19
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
[python] dataloader optimization (picking up 1169) #1224
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b8182d8
ExperimentDataPipe: configurable array-conversion method
ryan-williams f7f6121
group chunks iff `shuffle_chunk_count > 1`
ryan-williams 9655f8b
rm scipy.coo method
ryan-williams 54ffe73
add `METHODS` constant
ryan-williams 2fd1b14
Use return_sparse_X instead of adding a method kwarg
ivirshup b74bf67
Oops, one more thing
ivirshup f29b4c0
Merge branch 'main' into ivirshup/optimize-dataloader
ivirshup 664812a
revert change to shuffle_chunk_count branch
ivirshup 629af82
mypy + linting fixes
ivirshup 8bab49a
Add test for bug I found
ivirshup 4c042ee
Fix bug, possibly speed up dataloaders
ivirshup 9d5cb73
Remove unused (I think) branch
ivirshup 295b308
Remove more unused code
ivirshup 137f77d
Slightly more precise typing
ivirshup 4ac8511
Reduce additional copies in _tables_to_np
ivirshup f943404
Simplify branching in _ObsAndXSOMAIterator
ivirshup c1204bf
Merge branch 'main' into ivirshup/optimize-dataloader
ivirshup 357582e
typing fix
ivirshup 15cb1a8
Revert "typing fix"
ivirshup 4b1a993
Use more simplistic typing to avoid mypy + old python wrath
ivirshup 9cd6df7
Merge branch 'main' into ivirshup/optimize-dataloader
ivirshup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit (optional): why
npt.NDArray[Any]
and notnpt.NDArray[np.number]
(or something even more specific?)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.
Also, is the API signature really saying that it could return any sparse type? If it is actually constrained to a more specific set of sub-types (e.g, csr_matrix), it would be useful to further specify this type alias (even if just for the static type checking...)
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.
Used
np.number
, but mypy also want's explicit generics, so I went withnp.number[Any]
.Not totally sure I'm understanding the second part, since the alias here is already
csr_matrix
?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.
Hmm. This is opening up a big can of
typing
worms. There wouldn't be as much of an issue once we drop support for python 3.8.I think I will go back to
Any
until we move to SPEC-0