patrick-kidger / patrick-kidger/jaxtyping

Installing `jaxtyping` makes Pytest slow(er)

Open
#220 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.