Skip to content

Commit

Permalink
Merge branch '#282-restructure-example-directory' of https://github.c…
Browse files Browse the repository at this point in the history
…om/arjxn-py/PyBOP into #282-restructure-example-directory
  • Loading branch information
arjxn-py committed Jun 30, 2024
2 parents 6d06299 + c0e7a93 commit 56b95ba
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/periodic_benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
runs-on: [self-hosted, macOS, ARM64]
if: github.repository == 'pybop-team/PyBOP'
steps:
- name: Cleanup build folder
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- uses: actions/checkout@v4

- name: Install python & create virtualenv
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/scheduled_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ jobs:
matrix: ${{fromJson(needs.filter_pybamm_matrix.outputs.filtered_pybop_matrix)}}

steps:
- name: Cleanup build folder
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- uses: actions/checkout@v4
- name: Install python & create virtualenv
shell: bash
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- [#379](https://github.com/pybop-team/PyBOP/pull/379) - Adds model.simulateS1 to weekly benchmarks.
- [#174](https://github.com/pybop-team/PyBOP/issues/174) - Adds new logo and updates Readme for accessibility.
- [#316](https://github.com/pybop-team/PyBOP/pull/316) - Adds Adam with weight decay (AdamW) optimiser, adds depreciation warning for pints.Adam implementation.
- [#271](https://github.com/pybop-team/PyBOP/issues/271) - Aligns the output of the optimisers via a generalisation of Result class.
Expand Down
10 changes: 10 additions & 0 deletions benchmarks/benchmark_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,13 @@ def time_model_simulate(self, model, parameter_set):
parameter_set (str): The name of the parameter set being used.
"""
self.problem._model.simulate(inputs=self.inputs, t_eval=self.t_eval)

def time_model_simulateS1(self, model, parameter_set):
"""
Benchmark the simulateS1 method of the model.
Args:
model (pybop.Model): The model class being benchmarked.
parameter_set (str): The name of the parameter set being used.
"""
self.problem._model.simulateS1(inputs=self.inputs, t_eval=self.t_eval)
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@
"outputs": [],
"source": [
"ocp = loadmat(\"LG_M50_ECM/data/LGM50_5Ah_OCV.mat\", simplify_cells=True, mat_dtype=False)\n",
"pulse_data = loadmat(\"LG_M50_ECM/data/LGM50_5Ah_Pulse.mat\", simplify_cells=True, mat_dtype=False)\n",
"rate_data = loadmat(\"LG_M50_ECM/data/LGM50_5Ah_RateTest.mat\", simplify_cells=True, mat_dtype=False)"
"pulse_data = loadmat(\n",
" \"LG_M50_ECM/data/LGM50_5Ah_Pulse.mat\", simplify_cells=True, mat_dtype=False\n",
")\n",
"rate_data = loadmat(\n",
" \"LG_M50_ECM/data/LGM50_5Ah_RateTest.mat\", simplify_cells=True, mat_dtype=False\n",
")"
]
},
{
Expand Down Expand Up @@ -271,14 +275,14 @@
0.6170000000856817,
0.7250000000931323,
0.8570000000763685,
0.9250000000465661,
0.925000000046566,
1.0330000000540167,
1.1739999999990687,
1.173999999999069,
1.2300000000977889,
1.343000000109896,
1.4170000000158325,
1.5370000000111759,
1.6480000000447035,
1.537000000011176,
1.6480000000447037,
1.7160000000149012,
1.8209999999962747,
1.922000000020489,
Expand Down Expand Up @@ -353,11 +357,11 @@
8.852000000071712,
8.989000000059605,
9.078000000095926,
9.127000000094995,
9.274000000092201,
9.127000000094997,
9.2740000000922,
9.361000000033528,
9.434000000008382,
9.524000000092201,
9.5240000000922,
9.63600000005681,
9.754000000073574,
9.83800000010524,
Expand All @@ -366,13 +370,13 @@
10.065000000060536,
10.085000000079162,
11.104000000050291,
12.092000000062399,
12.0920000000624,
13.12100000004284,
14.091000000014901,
14.0910000000149,
15.08800000010524,
16.113000000012107,
17.14000000001397,
18.087000000057742,
18.087000000057746,
19.101000000024214,
20.10800000000745
],
Expand Down

0 comments on commit 56b95ba

Please sign in to comment.