Refactor node annotations in autograd_hooks.py
- Dominant language
- Python
- Stars
- 18
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Currently, node annotations are defined as a single dataclass, and creation and application are hacked into autograd_hooks.py and the training replay caches. This is not clean and hard to extend.
**Describe the solution you'd like**
Abstraction of node annotation as class, with `create`, `match`, and `apply` methods. Anything specific to a node annotation is provided there. All existing types are subclasses.
Contributor guide
Research direction
Start by reading autograd_hooks.py and the training replay caches to locate the current node-annotation dataclass and its creation and application paths. Review the existing annotation types and determine how they can expose create, match, and apply methods as subclasses. Done means the existing annotation behavior is preserved while annotation-specific logic is moved out of those callers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100