Skip to content

Ensure costs return evaluations#942

Draft
NicolaCourtier wants to merge 2 commits intodevelopfrom
costs-return-evaluations
Draft

Ensure costs return evaluations#942
NicolaCourtier wants to merge 2 commits intodevelopfrom
costs-return-evaluations

Conversation

@NicolaCourtier
Copy link
Copy Markdown
Member

@NicolaCourtier NicolaCourtier commented Apr 10, 2026

Description

Align the cost and problem evaluate methods by ensuring that the costs also return a pybop.Evaluation.

To-do:

  • enable a list of solutions and corresponding inputs to be evaluated in a single call
  • update the comparing_cost_functions.ipynb example notebook
  • (future goal) enable costs to be evaluated in parallel

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #).

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: $ pre-commit run or $ nox -s pre-commit (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctest
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.89%. Comparing base (4628a65) to head (47826e9).
⚠️ Report is 50 commits behind head on develop.

Files with missing lines Patch % Lines
pybop/problems/problem.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #942      +/-   ##
===========================================
+ Coverage    89.41%   90.89%   +1.47%     
===========================================
  Files           63       73      +10     
  Lines         4857     5690     +833     
===========================================
+ Hits          4343     5172     +829     
- Misses         514      518       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

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