Skip to content

ENH Fix running the test suite#44

Open
felixdivo wants to merge 9 commits into
benchopt:mainfrom
felixdivo:felixdivo-fix-ci-tests
Open

ENH Fix running the test suite#44
felixdivo wants to merge 9 commits into
benchopt:mainfrom
felixdivo:felixdivo-fix-ci-tests

Conversation

@felixdivo

@felixdivo felixdivo commented Jun 9, 2026

Copy link
Copy Markdown

Running benchopt test . and python -m pytest now fully work with zero failures. The latter now runs more tests than before.

Also updates the CI environment to never versions.

I.e., running `benchopt test .` now works.
@felixdivo felixdivo self-assigned this Jun 9, 2026
@felixdivo

Copy link
Copy Markdown
Author

The one deprecation warning will be fixed in the next huggingface_hub release (huggingface/huggingface_hub#4195).

@felixdivo felixdivo marked this pull request as ready for review June 9, 2026 14:32
@felixdivo felixdivo changed the title [WIP] Fix running the test suite Fix running the test suite Jun 9, 2026
@felixdivo felixdivo requested a review from tomMoral June 9, 2026 14:32
Their download hosts (timeseriesclassification.com returns 401; mitdb source
rate-limits) block CI runners, but both load fine locally. Replace the
misleading xfail with a CI-only pytest.skip applied to every test that
downloads them (get_data, benchmark_objective, solver_run), and restore mitdb
to the test datasets so it is still exercised locally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tomMoral

tomMoral commented Jun 9, 2026

Copy link
Copy Markdown
Member

the issue with UCR is that we don't cache it yet because the data is not downloaded in a controlable directory.
I did a PR in tslearn to fix this: tslearn-team/tslearn#679, should be more stable once the data is cached.

In the meantime, we could cache an extra directory: ~/.tslearn/dataset but I am not sure if this works with the way the CI is setup in benchopt (we could try) or we ask @rtavenar to merge this in tslearn ;) .

The failure for now is because we test that every solver can at least run with one dataset. As for classification, we rely on UCR and mantis can only run on classification, the test fails. So fixing UCR should fix the test.
another way could also be to have simulated dataset that we use for testing, or to simulate data when using debug.

We could also skip tests for mantis for now as it is the only classif only model

Skipping ucr in CI left Mantis (the only classification-only solver) with no
runnable dataset, which benchopt rejects ("ensure at least one configuration
runs"). Add a tiny network-free synthetic classification dataset and include it
in the Objective test_config so the classification path always has a dataset
that runs offline in CI.

The data is multivariate (3 channels: two targets + one covariate); the class
is encoded in the trend (rising/falling/flat) of one target channel. Verified
with a full `benchopt test .` (CI mode): 103 passed, 31 skipped, 0 failed, with
test_solver_run[mantis-dummy-classification] passing on CPU.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@felixdivo

Copy link
Copy Markdown
Author

@tomMoral Even better caching might not fully resolve this issue, e.g., if the cache is empty (initially or after changing environments). I guess a dummy/simulated dataset is the safer choice. I added one.

@felixdivo felixdivo changed the title Fix running the test suite ENH Fix running the test suite Jun 10, 2026
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.

2 participants