patrick-kidger / patrick-kidger/jaxtyping
Can we check statement-level annotations?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
One of my dreams for this package was to turn code like this
query = linear(head.query, t1) # L x Dk
key = linear(head.key, t1) # L x Dk
into this
query : LxDk = linear(head.query, t1)
key : LxDk = linear(head.key, t1)
where we have written
LxDk = f32["L Dk"]
earlier in the @jaxtyped function.
But it looks as if these annotations aren't checked?
I haven't looked into how hard that might be - is it a lot of work?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue centers on the @jaxtyped entry point and statement-level annotations; begin by tracing how @jaxtyped handles annotations inside a function. Use the shown LxDk example to establish the current behavior, and consider tests that verify whether those annotations are checked. Done means the intended statement-level checking behavior is implemented and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100