-
Notifications
You must be signed in to change notification settings - Fork 609
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
Disallow certain methods for dataset and tensor views #1311
Conversation
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.
Rename the error, resolve merge conflicts and then we should be good to merge this.
@tatevikh was this one resolved or is still in the backlog? asking to sort out the new contributor backlog! |
Codecov Report
@@ Coverage Diff @@
## main #1311 +/- ##
==========================================
+ Coverage 91.75% 92.22% +0.47%
==========================================
Files 193 194 +1
Lines 16879 17177 +298
==========================================
+ Hits 15487 15842 +355
+ Misses 1392 1335 -57
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Looks good!
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.
Minor nits. Looks good otherwise.
hub/util/no_view.py
Outdated
@wraps(callable) | ||
def inner(x, *args, **kwargs): | ||
func = callable.__name__ | ||
if not x.index.is_trivial(): |
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.
What if x
does not have an index
member? Or x.index
doesn't have a is_trivial
method?
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.
this function is to be used internally, only for datasets and tensors
@@ -1048,6 +1055,7 @@ def size_approx(self): | |||
return size | |||
|
|||
@hub_reporter.record_call | |||
@invalid_view_op |
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 think this decorator should be above @hub_reporter.record_call
for reporting to work properly.
🚀 🚀 Pull Request
Checklist:
coverage-rate
upChanges
Closes #1163