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

Added slice argument for load_hdf5 #1753

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JuanPedroGHM
Copy link
Member

@JuanPedroGHM JuanPedroGHM commented Dec 16, 2024

Some users have expressed interest in only loading partial slices from an HDF5 dataset. This PR adds the slices argument to load_hdf5, to allow dataset slicing like in the with the h5py API. Removes load_fraction argument to avoid redundancies.

Due Diligence

  • General:
  • Implementation:
    • unit tests: all split configurations tested
    • unit tests: multiple dtypes tested
    • benchmarks: created for new functionality
    • benchmarks: performance improved or maintained
    • documentation updated where needed

Description

Issue/s resolved: #

Changes proposed:

  • Slice argument for load_hdf5
  • Auxiliary function to calculate the new size and offset of a sliced axis

Type of change

Memory requirements

Performance

Does this change modify the behaviour of other functions? If so, which?

yes / no

@JuanPedroGHM JuanPedroGHM marked this pull request as draft December 16, 2024 16:59
Copy link
Contributor

Thank you for the PR!

@JuanPedroGHM JuanPedroGHM marked this pull request as ready for review December 18, 2024 08:21
Copy link
Contributor

Thank you for the PR!

@github-actions github-actions bot added core features testing Implementation of tests, or test-related issues labels Jan 13, 2025
Copy link
Contributor

Thank you for the PR!

@ClaudiaComito ClaudiaComito added this to the 1.6 milestone Jan 13, 2025
@JuanPedroGHM JuanPedroGHM changed the title Load slices of hdf5 dataset Added slice argument for load_hdf5 Jan 14, 2025
Copy link
Contributor

Thank you for the PR!

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 92.24%. Comparing base (87f2812) to head (2b1e647).

Files with missing lines Patch % Lines
heat/core/io.py 82.60% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1753      +/-   ##
==========================================
- Coverage   92.26%   92.24%   -0.02%     
==========================================
  Files          84       84              
  Lines       12445    12460      +15     
==========================================
+ Hits        11482    11494      +12     
- Misses        963      966       +3     
Flag Coverage Δ
unit 92.24% <82.60%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core features PR talk testing Implementation of tests, or test-related issues workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants