-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add iterable behavior for PointerTensor #3659
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.
🚀
Codecov Report
@@ Coverage Diff @@
## master #3659 +/- ##
=======================================
Coverage 94.74% 94.75%
=======================================
Files 182 182
Lines 18036 18061 +25
=======================================
+ Hits 17089 17114 +25
Misses 947 947
|
@@ -161,3 +161,9 @@ def register_tags(self, obj): | |||
|
|||
for tag in obj.tags: | |||
self._tag_to_object_ids[tag].add(obj.id) | |||
|
|||
def __len__(self): |
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.
@karlhigley are you also okay with this change? to be able to call len
on the object store
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.
Yeah, took me a minute to see what it was for, but seems pretty convenient. I think there's a count_objects()
method on BaseWorker
that could use this, but that's a "nice to have tweak" that shouldn't block this PR.
Pull Request
Fixes #3543
Description
Add the possibility to do:
Affected Dependencies
List any dependencies that are required for this change.
Type of Change
Please mark options that are relevant.
How has this been tested?
Checklist
Additional Context
Add a new method to the storage object such that we can call
len(alice.object_store
and will return the number of objects from the worker.