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

I/O performance improvements #100

Merged
merged 34 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5f81458
Replace file/name with hdf5 group/dataset when decoding
Jul 6, 2024
bed10c8
style: pre-commit fixes
pre-commit-ci[bot] Jul 6, 2024
b954b88
Fixed pre-commit thing
Jul 7, 2024
40526b4
Use low level h5py API to read LGDO objects
Jul 10, 2024
f0ac76d
Require h5py>=3.10
Jul 11, 2024
69b2a1b
Encode string attributes to utf-8 before writing
Jul 11, 2024
cae648e
Write files using paged aggregation
Jul 11, 2024
0db9fc4
Pre-commit fixes
Jul 11, 2024
56e334d
Merge branch 'main' of https://github.com/legend-exp/legend-pydataobj
Jul 11, 2024
322b250
Fixed bug when reading multiple files
Jul 12, 2024
050f964
style: pre-commit fixes
pre-commit-ci[bot] Jul 12, 2024
ce9c6d0
Added test_read_multiple_files
Jul 12, 2024
94037f7
Read files with file locking off
Jul 20, 2024
f035526
Merge branch 'main' of https://github.com/legend-exp/legend-pydataobj
iguinn Jul 25, 2024
efa2e8e
Use locking=false for lh5.show
Jul 25, 2024
1b2bef2
Bug fix
Aug 3, 2024
c19906b
style: pre-commit fixes
pre-commit-ci[bot] Aug 3, 2024
ee66f44
Merge branch 'main' of https://github.com/legend-exp/legend-pydataobj
Aug 23, 2024
66dc5b5
Allow sets as field_masks
Aug 23, 2024
e741684
Added args to set locking when reading files
Aug 26, 2024
142d277
Fixed merge problems
Aug 26, 2024
8985e01
style: pre-commit fixes
pre-commit-ci[bot] Aug 27, 2024
b20bc6b
Improved handling of kwargs for h5py.File. Added page_buffer kwarg
Aug 27, 2024
98a32b3
Merge branch 'main' of https://github.com/iguinn/legend-pydataobj
Aug 27, 2024
3137c53
pre-commit
Aug 27, 2024
a87033d
Fixed sphinx error
Aug 27, 2024
c835b7c
Added test of read multiple files with indices
Sep 3, 2024
968ea92
Fixed bugs with read multiple files with indices
Sep 3, 2024
ca08c64
style: pre-commit fixes
pre-commit-ci[bot] Sep 3, 2024
584cb46
Update src/lgdo/lh5/store.py
iguinn Sep 10, 2024
9b0eb51
Update src/lgdo/lh5/store.py
iguinn Sep 10, 2024
e538949
Update src/lgdo/lh5/core.py
iguinn Sep 10, 2024
a46970d
Removed unnecessary kwargs that are already default in h5py
iguinn Sep 10, 2024
c134065
Fixed bug in last commit
iguinn Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [
"awkward>=2",
"awkward-pandas",
"colorlog",
"h5py>=3.2",
"h5py>=3.10",
"hdf5plugin",
"hist",
"numba!=0.53.*,!=0.54.*",
Expand Down
18 changes: 9 additions & 9 deletions src/lgdo/lh5/_serializers/read/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
log = logging.getLogger(__name__)


def _h5_read_array_generic(type_, h5d, **kwargs):
nda, attrs, n_rows_to_read = _h5_read_ndarray(h5d, **kwargs)
def _h5_read_array_generic(type_, h5d, fname, oname, **kwargs):
nda, attrs, n_rows_to_read = _h5_read_ndarray(h5d, fname, oname, **kwargs)

obj_buf = kwargs["obj_buf"]

if obj_buf is None:
return type_(nda=nda, attrs=attrs), n_rows_to_read

utils.check_obj_buf_attrs(obj_buf.attrs, attrs, h5d)
utils.check_obj_buf_attrs(obj_buf.attrs, attrs, fname, oname)

return obj_buf, n_rows_to_read


def _h5_read_array(h5d, **kwargs):
return _h5_read_array_generic(Array, h5d, **kwargs)
def _h5_read_array(h5d, fname, oname, **kwargs):
return _h5_read_array_generic(Array, h5d, fname, oname, **kwargs)


def _h5_read_fixedsize_array(h5d, **kwargs):
return _h5_read_array_generic(FixedSizeArray, h5d, **kwargs)
def _h5_read_fixedsize_array(h5d, fname, oname, **kwargs):
return _h5_read_array_generic(FixedSizeArray, h5d, fname, oname, **kwargs)


def _h5_read_array_of_equalsized_arrays(h5d, **kwargs):
return _h5_read_array_generic(ArrayOfEqualSizedArrays, h5d, **kwargs)
def _h5_read_array_of_equalsized_arrays(h5d, fname, oname, **kwargs):
return _h5_read_array_generic(ArrayOfEqualSizedArrays, h5d, fname, oname, **kwargs)
Loading