Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Here's an example function usingtest_capi/test_watchers.py that passes in 3.12, but fails in 3.13 and 3.14:
deftest_watch_obj_dict(self):o=MyClass()withself.watcher()aswid:self.watch(wid,o.__dict__)o.foo="bar"self.assert_events(["new:foo:bar"])# fails in 3.13+
The dictionary watcher doesn't fire in 3.13+ even though theo.__dict__ changes wheno.foo is set to"bar". The problem is specific to inline values -- our code paths for inline values do not trigger dictionary watcher events. If the object does not use inline values, then the watcher events fire as expected.
This is a problem forPyTorch Dyanmo because it uses dictionary watchers for compiler guards.