You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize setitem with chunk equal to fill_value, round 2 (#738)
* Consolidate encode/store in _chunk_setitem_nosync
Matches how these lines are written in `_set_basic_selection_zd`.
* Clear key-value pair if chunk is just fill value
Add a simple check to see if the key-value pair is just being set with a
chunk equal to the fill value. If so, simply delete the key-value pair
instead of storing a chunk that only contains the fill value. The Array
will behave the same externally. However this will cutdown on the space
require to store the Array. Also will make sure that copying one Array
to another Array won't dramatically effect the storage size.
* set empty chunk write behavior via array constructor
* add rudimentary tests, np.equal -> np.array_equal
* add test for chunk deletion
* add flattening function
* add kwarg for empty writes to array creators
* fix check for chunk equality to fill value
* flake8
* add None check to setitems
* add write_empty_chunks to output of __getstate__
* flake8
* add partial decompress to __get_state__
* functionalize emptiness checks and key deletion
* flake8
* add path for delitems, and add some failing tests
* flake8
* add delitems method to FSStore, and correspondingly change zarr.Array behavior
* add nested + empty writes test
* set write_empty_chunks to True by default
* rename chunk_is_empty method and clean up logic in _chunk_setitem
* rename test
* add test for flatten
* initial support for using delitems api in chunk_setitems
* flake8
* strip path separator that was screwing up store.listdir
* change tests to check for empty writing behavior
* bump fsspec and s3fs versions
* delitems: only attempt to delete keys that exist
* cdon't pass empty collections to self.map.delitems
* flake8
* use main branch of fsspec until a new release is cut
* add support for checking if a chunk is all nans in _chunk_is_empty
* docstring tweaks
* clean up empty_write tests
* fix hexdigests for FSStore + empty writes, and remove redundant nchunks_initialized test
* resolve merge conflicts in favor of master
* set write_empty_chunks to True by default; put chunk emptiness checking in a function in util.py; optimize chunk emptiness checking
* remove np.typing import
* use public attribute in test_nchunks_initialized
* remove duplicated logic in _chunk_setitems, instead using _chunk_delitems; clean up 0d empty writes; add coverage exemptions
* expand 0d tests and nchunks_initialized tests to hit more parts of the write_empty_chunks logic
* remove return type annotation for all_equal that was breaking CI
* refactor write_empty_chunks tests by expanding the create_array logic in the base test class, remove standalone write_empty_chunks tests
* correctly handle merge from upstream master
* don't use os.path.join for constructing a chunk key; instead use _chunk_key method
* complete removal of os.path.join calls
* add coverage exemption to type error branch in all_equal
* remove unreachable conditionals in n5 tests
* instantiate ReadOnlyError
* add explcit delitems and setitems calls to readonly fsstore tests
* Update docstrings
* Update requirements_dev_optional
* Add changelog
Co-authored-by: John Kirkham <[email protected]>
Co-authored-by: Josh Moore <[email protected]>
Co-authored-by: jmoore <[email protected]>
0 commit comments