Skip to content

Conversation

@r3kste
Copy link
Collaborator

@r3kste r3kste commented Dec 6, 2025

This PR adds fixes for some recent failures in CI.

  1. Add pytorch-cpu as a conda dependency, to avoid installation of pytorch-cuda through pip.
  2. Ignore mypy warnings for incompatible assignment to pandas DataFrame. An alternative to fix this would be to convert the list to a np.array or pd.Series. However, this might cause unnecessary overhead as internally, pandas doesn't seem to convert the list.
  3. Skip a flaky doctest which fails due comparison of positive zero with negative zero, similar to CI failure on 'Run code snippets in documentation' due to negative signed zero. #642.
  4. Add a pytest fixture to close matplotlib figures after each test. This is inspired from what is done by seaborn here. This fixture is passed to all functions that create a matploltib figure.
  5. Temporarily skip a failing test: tests/optimagic/optimizers/test_pounders_integration.py::test_bntr[start_vec3-cg] on Linux environments with Python 3.10.

@r3kste r3kste mentioned this pull request Dec 6, 2025
3 tasks
@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/optimagic/optimization/history.py 93.63% <100.00%> (ø)
src/optimagic/visualization/slice_plot.py 96.12% <100.00%> (ø)
tests/conftest.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timmens
Copy link
Member

timmens commented Dec 7, 2025

Thanks for the fix! Can you ignore the failing doctest? We will have to fix this more robustly in the future, but for now that will be fine! Thanks!

Copy link
Member

@timmens timmens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!!

@timmens timmens merged commit 5ea7aa4 into optimagic-dev:main Dec 8, 2025
26 checks passed
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