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
Conversation
Tagging @tatevikh for visibility. |
Hi @neel2299 thanks for your contribution. We'll review it and get back to you:) |
Hi @neel2299 . How is the progress with this PR? Do you need any help here? Pleas do let us know:) |
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. |
There was a problem hiding this 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
hub/api/dataset.py
Outdated
@@ -31,6 +31,29 @@ | |||
from hub.util.cache_chain import generate_chain | |||
from hub.core.storage.hub_memory_object import HubMemoryObject | |||
|
|||
IMAGE_FORMAT_NAME = [ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/api/dataset.py
Outdated
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() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Codecov ReportBase: 92.60% // Head: 92.60% // Decreases project coverage by
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
Flags with carried forward coverage won't be shown. Click here to find out 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. |
@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 |
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 |
Makes sense @FayazRahman @adolkhan !! I will add them. |
@neel2299 let me know if you'll be working on this otherwise I'll close this PR for now. |
Closing for now. |
🚀 🚀 Pull Request
Checklist:
coverage-rate
upChanges
PR for issue #1556