Skip to content

test: trim fast gate to ~11s; run moved NNP tests in a slow CI job#99

Merged
isayev merged 1 commit into
mainfrom
test/slow-ci-job
Jun 12, 2026
Merged

test: trim fast gate to ~11s; run moved NNP tests in a slow CI job#99
isayev merged 1 commit into
mainfrom
test/slow-ci-job

Conversation

@isayev

@isayev isayev commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #98: trims the fast gate to ~11s and recovers the real-NNP coverage in a dedicated CI job.

Fast gate: ~27s → ~11s

Marks the 8 tests that load the real AIMNet2 model (via the session aimnet_model fixture) @pytest.mark.slow — 5 in test_model_adapter.py, 3 in test_model_factory.py. With no real NNP load left, pytest -m "not slow" is 621 passed in ~11s, fully deterministic (all durations < 1.1s). That's ~9.5× faster than the original ~104s baseline.

New slow CI job

To keep the real-NNP coverage running on every push/PR, adds a slow job to tests.yml that:

  • installs .[ase,ani,dev],
  • caches the AIMNet2 (~/.cache/aimnet) and torch/torchani (~/.cache/torch) model downloads,
  • runs the moved tests — test_model_adapter.py, test_model_factory.py, test_thermo_helpers.py under -m slow.

Verified locally: those 3 files under -m slow are 10 passed, ~22s, deterministic across runs.

Why scoped, not the full -m slow suite

A local run of the entire -m slow suite was 18 failed / 25 passed. The failures are pre-existing and unrelated to this change:

  • ~7 are ModuleNotFoundError: torchani (they pass with the [ani] extra the CI job installs);
  • the rest are heavy full-pipeline tests (test_auto3D / test_SPE / test_thermo) that pass individually but fail under combined, randomized ordering (e.g. test_auto3D_config2 passes alone in 18s). That's a test-isolation problem in the multiprocessing pipeline, tracked as separate hardening work — running the whole suite in CI as-is would be flaky-red.

So this job runs exactly the deterministic NNP integration tests that moved out of the fast gate; the heavy suite stays out until its isolation is fixed.

Mark the 8 tests that load the real AIMNet2 model via the session aimnet_model
fixture as @pytest.mark.slow (5 adapter tests, 3 factory tests). With no real NNP
load left, the fast gate (`pytest -m "not slow"`) drops from ~27s to ~11s and is
fully deterministic (621 passed, all durations < 1.1s).

To keep that real-NNP coverage in CI, add a `slow` job to tests.yml that installs
the [ase,ani,dev] extras, caches the AIMNet2/torch model downloads, and runs the
moved tests (test_model_adapter, test_model_factory, test_thermo_helpers) under
`-m slow` on every push/PR.

The job is deliberately scoped to those NNP integration tests rather than the full
`-m slow` suite: the heavy full-pipeline tests (test_auto3D / test_SPE / test_thermo)
pass individually but are flaky under combined, randomized ordering, so running
them in CI as-is would be red. Hardening their isolation is tracked separately.
@isayev isayev merged commit fb168e4 into main Jun 12, 2026
5 of 6 checks passed
@isayev isayev deleted the test/slow-ci-job branch June 12, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant