Cut the 3 s pytest startup without a warm process
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 34/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- performance, testing
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 2 h 9 min
- PR fusionados (30 d)
- 164
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de neurodata/prolearn
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 47/100
Los mantenedores suelen responder en 1 día
-
Write which page each figure sits on, and what each figure drawsPosiblemente ocupada @jovo la tomó hoy. Abierto
neurodata/prolearn#272 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de neurodata/prolearn
Issues similares
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPosiblemente ocupada @jejjohnson la tomó hoy. Abiertotype:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jejjohnson/integrix#144 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
finos/ai-governance-framework#459 ·
-
slurm: a case outcome nested too deep crashes status/collect instead of reading as no outcomeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
freelawproject/litigant-portal#1307 ·
Los mantenedores suelen responder en 2 días
-
type/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
h2oai/h2o-llmstudio#1163 ·
Los mantenedores suelen responder en 1 día