Skip to content

Commit

Permalink
Move required datasets at valid location
Browse files Browse the repository at this point in the history
  • Loading branch information
arjxn-py committed Jun 30, 2024
1 parent 51d3e9e commit edb2ca1
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 31 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 @@ -165,9 +165,13 @@
},
"outputs": [],
"source": [
"ocp = loadmat(\"data/LGM50_5Ah_OCV.mat\", simplify_cells=True, mat_dtype=False)\n",
"pulse_data = loadmat(\"data/LGM50_5Ah_Pulse.mat\", simplify_cells=True, mat_dtype=False)\n",
"rate_data = loadmat(\"data/LGM50_5Ah_RateTest.mat\", simplify_cells=True, mat_dtype=False)"
"ocp = loadmat(\"LG_M50_ECM/data/LGM50_5Ah_OCV.mat\", simplify_cells=True, mat_dtype=False)\n",
"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 @@ -261,7 +265,7 @@
{
"type": "scatter",
"x": [
0.0,
0,
0.01800000004004687,
0.12100000004284084,
0.25100000004749745,
Expand All @@ -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 Expand Up @@ -571,7 +575,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -607,7 +611,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -631,7 +635,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -667,7 +671,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -682,7 +686,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -718,7 +722,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -745,7 +749,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -781,7 +785,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -796,7 +800,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -832,7 +836,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand Down Expand Up @@ -977,7 +981,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -1013,7 +1017,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand Down Expand Up @@ -1104,7 +1108,7 @@
],
"sequential": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -1140,13 +1144,13 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
"sequentialminus": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -1182,7 +1186,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"source": [
"# Load the parameters\n",
"parameter_set = pybop.ParameterSet(\n",
" json_path=\"../scripts/parameters/initial_ecm_parameters.json\"\n",
" json_path=\"../../scripts/parameters/initial_ecm_parameters.json\"\n",
")\n",
"parameter_set.import_parameters()\n",
"# Define the model\n",
Expand Down

0 comments on commit edb2ca1

Please sign in to comment.