Skip to content

fix: in .to_bytes() return type specific bytes#1341

Merged
anna-charlotte merged 5 commits intofeat-rewrite-v2from
fix-to-bytes-return-videobytes
Apr 6, 2023
Merged

fix: in .to_bytes() return type specific bytes#1341
anna-charlotte merged 5 commits intofeat-rewrite-v2from
fix-to-bytes-return-videobytes

Conversation

@anna-charlotte
Copy link
Copy Markdown
Contributor

Goals:

Currently .to_bytes() method returns bytes. Let's return VideoBytes, ImageBytes, AudioBytes instead. Similar to how load_bytes() returns those type specific bytes, too.

  • check and update documentation, if required. See guide

anna-charlotte added 3 commits April 5, 2023 19:14
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
@github-actions github-actions bot added size/m and removed size/s labels Apr 6, 2023
Signed-off-by: anna-charlotte <[email protected]>
@github-actions github-actions bot added size/s and removed size/m labels Apr 6, 2023
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2023

📝 Docs are deployed on https://ft-fix-to-bytes-return-videobytes--jina-docs.netlify.app 🎉

Convert audio tensor to bytes.
Convert audio tensor to AudioBytes.
"""
from docarray.typing.bytes.audio_bytes import AudioBytes
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure if this is a problem, but had to put the import inside the method due to a circular import issue.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no worries

@anna-charlotte anna-charlotte marked this pull request as ready for review April 6, 2023 07:27
@anna-charlotte anna-charlotte merged commit 4d9ff9d into feat-rewrite-v2 Apr 6, 2023
@anna-charlotte anna-charlotte deleted the fix-to-bytes-return-videobytes branch April 6, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants