Additions for #327 - Enable DesignCosts in WeightedCost#413
Conversation
…s error checking for different problem class, general refactor for improved clarity
…inimising, adds integration tests
# Conflicts: # examples/scripts/spm_weighted_cost.py # pybop/costs/_likelihoods.py # pybop/costs/_weighted_cost.py # pybop/costs/base_cost.py # pybop/costs/fitting_costs.py # tests/unit/test_cost.py
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #413 +/- ##
===========================================
- Coverage 98.28% 98.24% -0.04%
===========================================
Files 46 46
Lines 2907 2910 +3
===========================================
+ Hits 2857 2859 +2
- Misses 50 51 +1 ☔ View full report in Codecov by Sentry. |
DesignCosts in WeightedCost
NicolaCourtier
left a comment
There was a problem hiding this comment.
I made some changes to clarify when each problem should be evaluated. Please check and see what you think! I also updated the output messages in spme_max_energy.py.
Happy to discuss further if you like, or proceed with this version.
…global update_capacity() usage, add tests for side-effects on underlying objects
|
Hi @NicolaCourtier - I've made a few updates, happy to discuss if you see anything worriesome, otherwise I'll merge :) |
NicolaCourtier
left a comment
There was a problem hiding this comment.
Please just amend the attribute description, otherwise looks good to me, thanks!
# Conflicts: # pybop/costs/_likelihoods.py # pybop/costs/_weighted_cost.py # pybop/costs/base_cost.py # pybop/costs/design_costs.py
|
Decreased coverage due to flaky test is fixed in #411. Merging as is. |
Description
This PR implements the following:
DesignCostclass intoWeightedCoststructure with support for sharing a single problem classWeightedCostwith design and fitting problemsIssue reference
Fixes #327
Review
Before you mark your PR as ready for review, please ensure that you've considered the following:
Type of change
Key checklist:
$ 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)$ nox -s tests$ nox -s doctestYou can run integration tests, unit tests, and doctests together at once, using
$ nox -s quick.Further checks:
Thank you for contributing to our project! Your efforts help us to deliver great software.