patrick-kidger / patrick-kidger/jaxtyping
Installing `jaxtyping` makes Pytest slow(er)
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
👋
On my machine:
$ time python -c 'import jaxtyping'
python -c 'import jaxtyping' 3.66s user 4.95s system 312% cpu 2.757 total
so, because jaxtyping has the pytest entry point, pytest will load jaxtyping._pytest_plugin which loads jaxtyping which takes 2.75s.
Would you consider putting the pytest-related code under a different tree?
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
Start by tracing the pytest entry point to jaxtyping._pytest_plugin and measuring the import path shown in the report. Check how pytest discovers and loads that plugin, then verify that pytest no longer imports the full jaxtyping package during startup while preserving the plugin behavior and comparing startup time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100