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

Correctly load chunks with larger headers #2574

Merged
merged 5 commits into from Sep 6, 2023
Merged

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented Sep 1, 2023

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

If the header of a chunk is larger than 100 bytes, a ValueError: buffer size must be a multiple of element size error was thrown because we only read the first 100 bytes of the chunk and assume the header will fit in it.

For performance reasons, this still assumes 100 bytes is all that will be needed, but will now get more data if needed.

Things to be aware of

I couldn't find an better way to test the logic than something more like an end-to-end test

Things to worry about

Nothing

@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Patch coverage: 78.57% and project coverage change: -1.92% ⚠️

Comparison is base (c4849ca) 83.83% compared to head (98e66a5) 81.91%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2574      +/-   ##
==========================================
- Coverage   83.83%   81.91%   -1.92%     
==========================================
  Files         224      224              
  Lines       24393    24403      +10     
==========================================
- Hits        20450    19990     -460     
- Misses       3943     4413     +470     
Flag Coverage Δ
unittests 81.91% <78.57%> (-1.92%) ⬇️

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

Files Changed Coverage Δ
deeplake/core/dataset/dataset.py 92.56% <ø> (-0.23%) ⬇️
deeplake/core/vectorstore/deeplake_vectorstore.py 97.50% <ø> (ø)
deeplake/util/version_control.py 96.73% <ø> (ø)
deeplake/core/serialize.py 96.93% <72.72%> (-0.86%) ⬇️
deeplake/enterprise/convert_to_libdeeplake.py 60.57% <100.00%> (-0.97%) ⬇️
deeplake/enterprise/libdeeplake_query.py 97.14% <100.00%> (ø)

... and 20 files with indirect coverage changes

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

@sonarcloud
Copy link

sonarcloud bot commented Sep 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

50.0% 50.0% Coverage
0.0% 0.0% Duplication

@nvoxland nvoxland merged commit 727116d into main Sep 6, 2023
13 of 16 checks passed
@nvoxland nvoxland deleted the handle_large_headers branch September 6, 2023 17:14
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.

None yet

3 participants