Closed
Conversation
Register a `slow` marker in `pyproject.toml` and a matching `--run-slow` CLI flag in `tests/conftest.py`. Tests carrying `@pytest.mark.slow` are skipped by default and can be opted into via `pytest --run-slow`. Mark `test_training` (parametrised over all datastores) and `test_training_output_std` as slow because they run a real `trainer.fit` loop on the MDP / npyfilesmeps datastores and take minutes per parametrisation. The fast unit tests in the suite (`test_all_gather_cat_*`, datastore tests against the dummy fixture, etc.) continue to run on every `pytest` invocation. Motivated by #635 which already needed this mechanism for the ERA5 boundary integration test. Landing the infra separately so it's reusable across the suite (e.g. the `test_state_only_datastore_*` training test on #231 and future trainer.fit-based regressions). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Default pytest skips tests marked @pytest.mark.slow. CI should always run the full suite (including trainer.fit-based regressions) so PRs targeting main can't ship behaviour breakage that local-default pytest would miss. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per @observingClouds's review on #651: pytest already has built-in marker filtering, so we don't need the custom pytest_addoption + pytest_collection_modifyitems hook to support skip-by-default behaviour. Drop the custom flag entirely and rely on pytest's native -m marker selection: - `pytest` (no flags) runs the full suite, including slow tests (this restores the prior default behaviour, addresses observingClouds' safety concern). - `pytest -m "not slow"` skips slow tests for fast local iteration. - CI runs `pytest` unchanged - no --run-slow flag needed. Keep only the marker registration in pyproject.toml and the @pytest.mark.slow decorators on test_training and test_training_output_std. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Hauke Schulz <43613877+observingClouds@users.noreply.github.com>
Removed pytest markers configuration from pyproject.toml.
…hread' into copilot/fix-comments-in-review-thread
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
slowpytest marker and apply to training tests #651 review thread comments and identify required fixes