Cut the 3 s pytest startup without a warm process
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 34/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- performance, testing
調査の方向性
Start by profiling the fast tier with python -X importtime and pytest --collect-only, with xdist off and on, then compare against main and a --testmon run selecting a few tests. Use the results to recommend which startup cost to address first; the issue leaves the implementation choice and whether selection size should control worker count to the maintainer.
索引モデルが issue の本文から書いたものです。
説明
Starting four xdist workers and collecting the tests costs 3.1–3.4 s per run, even when no test runs. That is about half the fast tier's wall time. #220 considered a warm test process (pytest-hot-reloading) and turned it down: it is alpha, lists Python only up to 3.12, drops the xdist workers, and can return stale results.
Ways to try, each measured against main on the fast tier and on a --testmon run that selects a few tests:
- Profile the startup. Use
python -X importtimeandpytest --collect-onlywith xdist off and on, to split the 3 s into interpreter start, plugin loading, imports during collection (torch, matplotlib, jsonschema, sklearn), and worker boot. - Defer heavy imports in test modules. Move module-level imports of torch, matplotlib and the experiment scripts into the tests or fixtures that use them, so that collection imports only what it needs.
- Skip xdist for small selections. When
--testmonor-kleaves only a few tests, run them in one process, since booting four workers costs more than it saves. pytest-xdist's-n autodoes not do this. Apytest_xdist_auto_num_workershook or a conftest check could. - Disable plugins the fast tier does not use, such as
-p no:entries inaddopts.
Questions for the maintainer:
- Which of these to try first? Proposed default: 1, then whichever of 2–4 the profile points to.
- Is changing worker count by selection size (3) acceptable, given that it makes a run's parallelism depend on how many tests it selects?
Refs #220.
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 2時間 9分
- マージ済み PR(30日)
- 164
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
neurodata/prolearn のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 47/100
メンテナーはふだん 1 日以内に返信
-
Write which page each figure sits on, and what each figure draws対応中かも @jovo が今日担当しました。 オープン
neurodata/prolearn#272 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
neurodata/prolearn の issue をすべて見る
似ている issue
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionError対応中かも @jejjohnson が今日担当しました。 オープンtype:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jejjohnson/integrix#144 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
finos/ai-governance-framework#459 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
freelawproject/litigant-portal#1307 ·
メンテナーはふだん 2 日以内に返信
-
type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
h2oai/h2o-llmstudio#1163 ·
メンテナーはふだん 1 日以内に返信