-
Notifications
You must be signed in to change notification settings - Fork 24.9k
[dict] Implement __eq__
for dict_items
#155154
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
base: gh/guilhermeleobas/166/base
Are you sure you want to change the base?
[dict] Implement __eq__
for dict_items
#155154
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155154
Note: Links to docs will display an error until the docs builds have been completed. ❌ 10 New Failures, 1 Pending, 3 Unrelated FailuresAs of commit ed7054c with merge base e619c6b ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
def call_method(self, tx, name, args, kwargs): | ||
if name == "__eq__": | ||
assert len(args) == 1 | ||
if isinstance(args[0], DictItemsVariable): | ||
return self.dv_dict.call_method(tx, "__eq__", [args[0].dv_dict], {}) | ||
return ConstantVariable.create(False) | ||
return super().call_method(tx, name, args, kwargs) |
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 one should actually check if args[0]
implements a mapping protocol and go from there.
Stack from ghstack (oldest at bottom):
dict.update()
with no args #158061fromkeys
classmethod #155608bool(OrderedDict)
#155503hasattr(..., IteratorVariable)
#155501__eq__
for dict_items #155154OrderedDict.popitem(last=...)
#155153OrderedDict.move_to_end(key, last=False)
#155152set_fullgraph(False)
intest_dict
/test_ordered_dict
#160156