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

Add the ability to set chunksize when making the dask array #232

Merged
merged 7 commits into from
May 9, 2023

Conversation

Cadair
Copy link
Member

@Cadair Cadair commented Mar 24, 2023

This PR got a little 🐂 shaving, I removed the use of ExternalArrayReference, however, its primary purpose is to provide the primatives to allow the optional specification of a chunksize when making a dask array from each loader referenced by an asdf.

This should be all the changes needed to test the performance of loading a chunked array, and then changes to the asdf maker can use them later.

This also cleans up the implementation of the Loader class by making the abstract method the __getitem__ method, this is needed to access .section and read only a subset of the file.

TODO:

  • Write a test jig which loads an asdf file and then retrospectively injects a chunksize and benchmark it.

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #232 (6abebee) into main (feb7bb2) will increase coverage by 0.01%.
The diff coverage is 95.40%.

@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
+ Coverage   97.18%   97.20%   +0.01%     
==========================================
  Files          37       37              
  Lines        2095     2108      +13     
==========================================
+ Hits         2036     2049      +13     
  Misses         59       59              
Impacted Files Coverage Δ
dkist/io/asdf/converters/file_manager.py 92.59% <66.66%> (-3.41%) ⬇️
dkist/io/dask_utils.py 72.22% <83.33%> (+1.63%) ⬆️
dkist/io/loaders.py 96.00% <90.90%> (-4.00%) ⬇️
dkist/dataset/dataset.py 92.04% <100.00%> (-0.27%) ⬇️
dkist/io/asdf/entry_points.py 100.00% <100.00%> (ø)
dkist/io/asdf/tests/test_dataset.py 100.00% <100.00%> (ø)
dkist/io/asdf/tests/test_tiled_dataset.py 100.00% <100.00%> (ø)
dkist/io/file_manager.py 98.90% <100.00%> (+1.58%) ⬆️

@Cadair Cadair force-pushed the add_chunksize branch 2 times, most recently from b879eab to 8c24c44 Compare March 28, 2023 15:12
@Cadair Cadair requested a review from SolarDrew May 9, 2023 14:09
@Cadair Cadair marked this pull request as ready for review May 9, 2023 14:09
Copy link
Contributor

@SolarDrew SolarDrew left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Cadair Cadair merged commit 49e4712 into DKISTDC:main May 9, 2023
@Cadair Cadair deleted the add_chunksize branch May 9, 2023 14:33
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