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

Generate a better error message if a list or other unsupported argument is passed to video.normalize_index #2787

Merged
merged 1 commit into from Mar 7, 2024

Conversation

nvoxland-al
Copy link
Contributor

🚀 🚀 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

The video frame lookup does not support lists or other object types, so ds.video[0][[0,1,2],].numpy().shape throws an unhelpful error message.

This PR provides a better error message for lists in particular and any unsupported type in general.

Things to be aware of

Only impacts video parsing

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 83.92%. Comparing base (e568b2e) to head (efd12d4).

Files Patch % Lines
deeplake/util/video.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2787      +/-   ##
==========================================
- Coverage   84.51%   83.92%   -0.60%     
==========================================
  Files         231      231              
  Lines       26459    26462       +3     
==========================================
- Hits        22362    22207     -155     
- Misses       4097     4255     +158     
Flag Coverage Δ
unittests 83.92% <66.66%> (-0.60%) ⬇️

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.

Copy link

sonarcloud bot commented Mar 5, 2024

@nvoxland-al nvoxland-al merged commit 86f6e8b into main Mar 7, 2024
10 of 12 checks passed
@nvoxland-al nvoxland-al deleted the normalize_index_message branch March 7, 2024 15:58
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

4 participants