Skip to content

Fix workflows, lint, and tests (due to sklearn behaviour change) - #301

Open
guglielmopadula wants to merge 2 commits into
mathLab:masterfrom
guglielmopadula:master
Open

guglielmopadula wants to merge 2 commits into
mathLab:masterfrom
guglielmopadula:master

Conversation

@guglielmopadula

@guglielmopadula guglielmopadula commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fix GPR tests for scikit-learn 1.9, black lint, and deprecated CI actions

1. GPR tests (tests/test_reducedordermodel.py)

test_predict_02 and test_loo_error_02 failed (serial and parallel suites).

Why: GPR() passes kernel=None to sklearn. Before 1.9, sklearn's default
was ConstantKernel(1.0, fixed) * RBF(1.0, fixed). Since 1.9 it is an
optimizable C() * RBF(). With only 4 training points the RBF length scale
collapses to its lower bound (1e-05), so results no longer match the stored
references (p_predsol_gpr.npy, 0.595857).

Change: the two tests now pass the historical kernel explicitly through a
_fixed_kernel() helper. The GPR default is unchanged and still defers to
sklearn.

2. Lint (ezyrb/reducedordermodel.py)

The black --check ./ezyrb CI job failed on the new MultiReducedOrderModel
methods (lines too long, trailing whitespace, missing final newline). The file
was reformatted with black; formatting only, no code changes.

3. GitHub Actions (.github/workflows/*.yml)

GitHub is retiring the Node 20 runtime, so actions were bumped to their latest
Node 24 releases:

Action Old New
actions/checkout v4 v7
actions/setup-python v4 / v5 v7
actions/setup-java v3 v6
peter-evans/create-pull-request v3 / v5.0.2 v8
peaceiris/actions-gh-pages v3 v4
benjlevesque/short-sha v2.1 v5.0

In tutorial_exporter.yml, two actions with no Node 24 release were replaced
with shell steps:

  • jitterbit/get-changed-files@v1 (Node 12, unmaintained) is now
    git diff --name-only ${{ github.event.before }} ${{ github.sha }}, and the
    checkout uses fetch-depth: 0.
  • FedericoCarboni/setup-ffmpeg (still Node 20) is now apt-get install ffmpeg.

4. Supported Python versions

  • Test matrices (tester.yml, monthly-tagger.yml): dropped 3.9 and 3.10,
    added 3.14 and 3.15 (now 3.11–3.15).
  • tutorial_exporter.yml: 3.10 → 3.11, the oldest tested version.
  • requires-python in pyproject.toml is unchanged (>=3.8).

This branch has not been deployed

No deployments
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