-
Notifications
You must be signed in to change notification settings - Fork 632
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
[AL-1331] Api reference updates #1384
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1384 +/- ##
==========================================
+ Coverage 92.80% 92.85% +0.04%
==========================================
Files 174 174
Lines 12793 12793
==========================================
+ Hits 11873 11879 +6
+ Misses 920 914 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
hub/core/tensor.py
Outdated
@@ -451,6 +451,16 @@ def data(self) -> Any: | |||
return self.numpy() | |||
|
|||
def tobytes(self) -> bytes: | |||
"""Returns the bytes of the tensor. Only works for a single sample of tensor. | |||
If the tensor is compressed, it returns the compressed bytes. |
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.
@AbhinavTuli Does this work if the raw data is not compressed? If it errors, we should say that you can't run this operation for uncompressed data.
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.
added explanations for all 3 cases, uncompressed, sample compressed and chunk compressed.
@AbhinavTuli Can you pls make the information below into a table or bullet points, or something that's easier to read: |
🚀 🚀 Pull Request
Checklist:
coverage-rate
upChanges
Adds/improves documentation for the following:-