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

Video bug fix #1349

Merged
merged 14 commits into from
Dec 29, 2021
Merged

Video bug fix #1349

merged 14 commits into from
Dec 29, 2021

Conversation

farizrahman4u
Copy link
Contributor

🚀 🚀 Pull Request

Checklist:

  • My code follows the style guidelines of this project and the Contributing document
  • I have commented my code, particularly in hard-to-understand areas
  • I have kept the coverage-rate up
  • I have performed a self-review of my own code and resolved any problems
  • I have checked to ensure there aren't any other open Pull Requests for the same change
  • I have described and made corresponding changes to the relevant documentation
  • New and existing unit tests pass locally with my changes

Changes

Fill missing tail frames from floating precision with blank frames.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #1349 (1df0aa2) into main (2e815f9) will decrease coverage by 0.08%.
The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1349      +/-   ##
==========================================
- Coverage   92.34%   92.25%   -0.09%     
==========================================
  Files         176      176              
  Lines       14140    14160      +20     
==========================================
+ Hits        13057    13064       +7     
- Misses       1083     1096      +13     
Flag Coverage Δ
unittests 92.25% <95.45%> (-0.09%) ⬇️

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

Impacted Files Coverage Δ
hub/core/sample.py 88.81% <50.00%> (-1.25%) ⬇️
hub/core/compression.py 89.09% <70.00%> (-0.41%) ⬇️
hub/api/tests/test_video.py 100.00% <100.00%> (ø)
hub/core/tests/test_compression.py 100.00% <100.00%> (ø)
hub/tests/path_fixtures.py 93.04% <100.00%> (+1.57%) ⬆️
hub/integrations/tests/test_pytorch_dataloader.py 95.69% <0.00%> (-2.16%) ⬇️
hub/core/storage/s3.py 71.91% <0.00%> (-1.69%) ⬇️
hub/core/lock.py 83.47% <0.00%> (-1.66%) ⬇️
hub/integrations/pytorch/dataset.py 91.46% <0.00%> (-1.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e815f9...1df0aa2. Read the comment docs.

)
nbytes = len(raw_video)
size = np.prod(shape)
if nbytes >= size:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please aslo add some comments why this logic is here.

for i in range(10):
assert ds.video[i].numpy().shape == sample.shape # type: ignore
for path in video_paths[compression]:
ds.create_tensor("video", htype="video", sample_compression=compression)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this create this tensor multiple times?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@farizrahman4u farizrahman4u merged commit 08c1e15 into main Dec 29, 2021
@farizrahman4u farizrahman4u deleted the fr_video_fix branch December 29, 2021 20:34
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.

4 participants