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

changes for audio/video support in hub.ingest #1643

Closed
wants to merge 18 commits into from

Conversation

neel2299
Copy link
Contributor

@neel2299 neel2299 commented May 1, 2022

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

PR for issue #1556

@neel2299
Copy link
Contributor Author

neel2299 commented May 2, 2022

Tagging @tatevikh for visibility.

@tatevikh
Copy link
Collaborator

tatevikh commented May 2, 2022

Hi @neel2299 thanks for your contribution. We'll review it and get back to you:)

@tatevikh tatevikh requested a review from FayazRahman May 2, 2022 10:23
@tatevikh
Copy link
Collaborator

Hi @neel2299 . How is the progress with this PR? Do you need any help here? Pleas do let us know:)

@neel2299
Copy link
Contributor Author

Hi @tatevikh, thanks for reminding me. It skipped my mind that I had this PR open, I will get this done as soon as possible.

Copy link
Contributor

@FayazRahman FayazRahman left a comment

Choose a reason for hiding this comment

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

Few comments, also fix merge conflicts

@@ -31,6 +31,29 @@
from hub.util.cache_chain import generate_chain
from hub.core.storage.hub_memory_object import HubMemoryObject

IMAGE_FORMAT_NAME = [
Copy link
Contributor

Choose a reason for hiding this comment

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

these are already listed in hub/compression.py. Could you use that?

Copy link
Contributor Author

@neel2299 neel2299 Aug 20, 2022

Choose a reason for hiding this comment

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

Yep, I have updated it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you reuse that list instead of listing it here again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, my bad! I had switched to using the list from compression.py but forgot to remove list here.
Removed it now!

hub/auto/unstructured/classification.py Outdated Show resolved Hide resolved
@FayazRahman FayazRahman added the trigger-test Label trigger to run tests on PRs label Aug 31, 2022
@activeloop-bot activeloop-bot removed the trigger-test Label trigger to run tests on PRs label Aug 31, 2022
@FayazRahman FayazRahman added the trigger-test Label trigger to run tests on PRs label Sep 2, 2022
@activeloop-bot activeloop-bot removed the trigger-test Label trigger to run tests on PRs label Sep 2, 2022
from hub.util.storage import get_storage_and_cache_chain, storage_provider_from_path
from hub.util.compute import get_compute_provider
from hub.util.remove_cache import get_base_storage
from hub.util.cache_chain import generate_chain
from hub.core.storage.hub_memory_object import HubMemoryObject

IMAGE_COMPRESSIONS = IMAGE_COMPRESSIONS.copy()
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe you can do something like _image_compressions in hub/htype.py instead of this. https://github.com/activeloopai/Hub/blob/main/hub/htype.py#L208

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! That makes more sense. Forgot you use upper case only for constants.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I meant you need to include the other compression aliases other than jpg, like in the mentioned file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed "dcm" like in htype.py as well. Hope this works.

@neel2299 neel2299 requested review from FayazRahman and removed request for FayazRahman September 5, 2022 06:34
@neel2299 neel2299 requested review from FayazRahman and removed request for FayazRahman September 5, 2022 06:34
@FayazRahman FayazRahman added the trigger-test Label trigger to run tests on PRs label Sep 16, 2022
@activeloop-bot activeloop-bot removed the trigger-test Label trigger to run tests on PRs label Sep 16, 2022
@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 92.60% // Head: 92.60% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (d26c5d8) compared to base (72bc6b4).
Patch coverage: 82.14% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1643      +/-   ##
==========================================
- Coverage   92.60%   92.60%   -0.01%     
==========================================
  Files         245      245              
  Lines       25984    26023      +39     
==========================================
+ Hits        24063    24098      +35     
- Misses       1921     1925       +4     
Flag Coverage Δ
unittests 92.60% <82.14%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
hub/auto/tests/test_ingestion.py 98.71% <ø> (ø)
hub/integrations/wandb/wandb.py 48.05% <40.00%> (-0.21%) ⬇️
hub/api/dataset.py 89.45% <73.33%> (-0.92%) ⬇️
hub/auto/unstructured/classification.py 87.23% <82.35%> (ø)
hub/__init__.py 94.73% <100.00%> (ø)
hub/compression.py 97.95% <100.00%> (+0.23%) ⬆️
hub/constants.py 100.00% <100.00%> (ø)
hub/core/compression.py 89.64% <100.00%> (ø)
hub/experimental/convert_to_hub3.py 90.24% <100.00%> (+10.75%) ⬆️
hub/experimental/test_pytorch.py 99.21% <100.00%> (+0.01%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@FayazRahman FayazRahman self-requested a review September 19, 2022 08:31
@FayazRahman
Copy link
Contributor

@neel2299 Looks good so far, could you also tests for these? See this file for example: https://github.com/activeloopai/Hub/blob/main/hub/auto/tests/test_ingestion.py#L63

@adolkhan
Copy link
Contributor

Dear @neel2299, agree with @FayazRahman, could you please add some tests? Lines of code that need tests are highlighted with codecove, you can take a look at it in Files Changed section

@neel2299
Copy link
Contributor Author

neel2299 commented Sep 21, 2022

Makes sense @FayazRahman @adolkhan !! I will add them.

@tatevikh
Copy link
Collaborator

@neel2299 let me know if you'll be working on this otherwise I'll close this PR for now.

@tatevikh
Copy link
Collaborator

Closing for now.

@tatevikh tatevikh closed this Dec 30, 2022
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

5 participants