Skip to content

Commit

Permalink
Merge branch 'develop' into jaxify-idaklu-implementation
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	examples/notebooks/battery_parameterisation/single_pulse_circuit_model.ipynb
  • Loading branch information
BradyPlanden committed Dec 4, 2024
2 parents a6f987d + 38346e0 commit 9dec62d
Show file tree
Hide file tree
Showing 94 changed files with 7,260 additions and 6,102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lychee_links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
--max-retries 5
--skip-missing
--exclude-loopback
--accept 200,429,999
--accept 200,403,429,999
--exclude "https://tiles.stadiamaps.com/*|https://b.tile.openstreetmap.org/*"
--exclude "https://cartodb-basemaps-c.global.ssl.fastly.net/*"
--exclude "https://events.mapbox.com/*|https://events.mapbox.cn/*|https://api.mapbox.cn/*"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Expand All @@ -61,10 +62,11 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
Expand Down Expand Up @@ -95,10 +97,11 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.1"
rev: "v0.8.1"
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down Expand Up @@ -34,7 +34,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
args: ['--keep-output', '--drop-empty-cells']
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
## Features

- [#481](https://github.com/pybop-team/PyBOP/pull/481) - Adds experimental support for PyBaMM's jaxified IDAKLU solver. Includes Jax-specific cost functions `pybop.JaxSumSquareError` and `pybop.JaxLogNormalLikelihood`. Adds `Jax` optional dependency to PyBaMM dependency.
- [#570](https://github.com/pybop-team/PyBOP/pull/570) - Updates the contour and surface plots, adds mixed chain effective sample size computation, x0 to optim.log
- [#566](https://github.com/pybop-team/PyBOP/pull/566) - Adds `UnitHyperCube` transformation class, fixes incorrect application of gradient transformation.
- [#569](https://github.com/pybop-team/PyBOP/pull/569) - Adds parameter specific learning rate functionality to GradientDescent optimiser.
- [#282](https://github.com/pybop-team/PyBOP/issues/282) - Restructures the examples directory.
- [#396](https://github.com/pybop-team/PyBOP/issues/396) - Adds `ecm_with_tau.py` example script.
- [#452](https://github.com/pybop-team/PyBOP/issues/452) - Extends `cell_mass` and `approximate_capacity` for half-cell models.
- [#544](https://github.com/pybop-team/PyBOP/issues/544) - Allows iterative plotting using `StandardPlot`.
- [#541](https://github.com/pybop-team/PyBOP/pull/541) - Adds `ScaledLogLikelihood` and `BaseMetaLikelihood` classes.
Expand All @@ -14,6 +19,7 @@
## Optimisations

- [#512](https://github.com/pybop-team/PyBOP/pull/513) - Refactors `LogPosterior` with attributes pointing to composed likelihood object.
- [#551](https://github.com/pybop-team/PyBOP/pull/551) - Refactors Optimiser arguments, `population_size` and `max_iterations` as default args, improves optimiser docstrings

## Bug Fixes

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ These include a wide variety of optimisation problems that require careful consi

Explore our [example notebooks](https://github.com/pybop-team/PyBOP/blob/develop/examples) for hands-on demonstrations:

- [Gravimetric design optimisation (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/energy_based_electrode_design.ipynb)
- [Non-linear constrained ECM parameter identification](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/ecm_trust-constr.ipynb)
- [Optimiser comparison for parameter identification](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/multi_optimiser_identification.ipynb)
- [Parameter identification for spatial pouch cell model](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/pouch_cell_identification.ipynb)
- [Estimating ECM parameters from HPPC pulse](https://github.com/pybop-team/PyBOP/blob/develop/examples/notebooks/equivalent_circuit_identification_hppc.ipynb)
- [Gravimetric design optimisation (SPMe)](https://nbviewer.org/github/pybop-team/PyBOP/blob/develop/examples/notebooks/design_optimisation/energy_based_electrode_design.ipynb)
- [Non-linear constrained ECM parameter identification](https://nbviewer.org/github/pybop-team/PyBOP/blob/develop/examples/notebooks/battery_parameterisation/ecm_trust-constr.ipynb)
- [Optimiser comparison for parameter identification](https://nbviewer.org/github/pybop-team/PyBOP/blob/develop/examples/notebooks/comparison_examples/multi_optimiser_identification.ipynb)
- [Parameter identification for spatial pouch cell model](https://nbviewer.org/github/pybop-team/PyBOP/blob/develop/examples/notebooks/battery_parameterisation/pouch_cell_identification.ipynb)
- [Estimating ECM parameters from HPPC pulse](https://nbviewer.org/github/pybop-team/PyBOP/blob/develop/examples/notebooks/battery_parameterisation/equivalent_circuit_identification_hppc.ipynb)

### Python Scripts

Find additional script-based examples in the [examples directory](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/):

- [UKF parameter identification (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_UKF.py)
- [BPX format parameter import/export](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/BPX_spm.py)
- [Electrochemical Impendence Spectroscopy (EIS) parameter identification](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/eis_fitting.py)
- [Maximum a Posteriori parameter identification (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/BPX_spm.py)
- [Gradient-based parameter identification (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_AdamW.py)
- [UKF parameter identification (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/comparison_examples/spm_UKF.py)
- [BPX format parameter import/export](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/getting_started/BPX_spm.py)
- [Electrochemical Impendence Spectroscopy (EIS) parameter identification](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/battery_parameterisation/eis_fitting.py)
- [Maximum a Posteriori parameter identification (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/getting_started/BPX_spm.py)
- [Gradient-based parameter identification (SPM)](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/comparison_examples/spm_AdamW.py)


### Supported Methods
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_optim_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup(self, model, parameter_set, optimiser):
Args:
model (pybop.Model): The model class to be benchmarked.
parameter_set (str): The name of the parameter set to be used.
optimiser (pybop.Optimiser): The optimizer class to be used.
optimiser (pybop.Optimiser): The optimiser class to be used.
"""
# Set random seed
set_random_seed()
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_parameterisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ def time_optimiser_ask(self, model, parameter_set, optimiser):
optimiser (pybop.Optimiser): The optimizer class being used.
"""
if optimiser not in [pybop.SciPyMinimize, pybop.SciPyDifferentialEvolution]:
self.optim.pints_optimiser.ask()
self.optim.optimiser.ask()
4 changes: 2 additions & 2 deletions benchmarks/benchmark_track_parameterisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setup(self, model, parameter_set, optimiser):
Args:
model (pybop.Model): The model class to be benchmarked.
parameter_set (str): The name of the parameter set to be used.
optimiser (pybop.Optimiser): The optimizer class to be used.
optimiser (pybop.Optimiser): The optimiser class to be used.
"""
# Set random seed
set_random_seed()
Expand Down Expand Up @@ -121,7 +121,7 @@ def results_tracking(self, model, parameter_set, optimiser):
Args:
model (pybop.Model): The model class being benchmarked (unused).
parameter_set (str): The name of the parameter set being used (unused).
optimiser (pybop.Optimiser): The optimizer class being used (unused).
optimiser (pybop.Optimiser): The optimiser class being used (unused).
"""
results = self.optim.run()
return results.x
File renamed without changes.

Large diffs are not rendered by default.

Loading

0 comments on commit 9dec62d

Please sign in to comment.