Remove caching from torch information endpoint - #472
Conversation
The cache was not working so we remove it.
There was a problem hiding this comment.
Pull request overview
Removes functools.cache-based memoization from the PyTorch __array_namespace_info__ inspection namespace because it was ineffective in common usage patterns (new __array_namespace_info__ instances led to cache misses).
Changes:
- Drop
from functools import cacheimport. - Remove
@cachedecorators fromdtypes()anddevices()in the PyTorch info namespace.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
LGTM and CI is green and it's merged. Thanks @betatim |
|
Out of interest: where/how is it configured that copilot comes and reviews? And can you configure copilot to tell it things about how to review? |
|
Yeah, we should prbably just disable these automated Copilot revews |
|
Disabled at the repo level. There is no org-level setting for Copilot it looks like. |
The
@cachedecorator was not working so we remove it. Because it usesselfas part of they key each new instance had a new fresh cache. And basically you get a new instance every time.Closes #470