Skip to content

Commit 9895165

Browse files
authored
Make benchmarks faster and more readable (#839)
* Enhance the new-notebook section of the contribution guide * Simplify benchmarking code * Make benchmarks simpler and more like examples * Update the benchmark runner in the CI * Format the example notebooks * Run examples and benchmarks on multiple python versions * Tighten the migration guide a bit (so it becomes easier to maintain)
1 parent 6cc025f commit 9895165

35 files changed

Lines changed: 1021 additions & 1577 deletions

.github/workflows/ci.yaml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -72,35 +72,15 @@ jobs:
7272
pip install .[cpu,test]
7373
- name: Run tests
7474
run: make test
75-
dry-run-benchmarks:
76-
name: Dry-run benchmarks with ${{ matrix.python-version }} on ${{ matrix.os }}
77-
runs-on: ${{ matrix.os }}
78-
timeout-minutes: 10
79-
strategy:
80-
fail-fast: false
81-
matrix:
82-
python-version: ['3.12']
83-
os: [ubuntu-latest]
84-
steps:
85-
- uses: actions/checkout@v4
86-
- name: Set up Python ${{ matrix.python-version }}
87-
uses: actions/setup-python@v4
88-
with:
89-
python-version: ${{ matrix.python-version }}
90-
- name: Install dependencies
91-
run: |
92-
pip install --upgrade pip
93-
pip install .[cpu,doc]
94-
- name: Sync and execute notebooks
95-
run: make benchmarks-dry-run
9675
doc:
97-
name: Build docs with ${{ matrix.python-version }} on ${{ matrix.os }}
76+
name: Build docs with ${{ matrix.python-version }} on ${{ matrix.os }} (runs examples
77+
and benchmarks)
9878
runs-on: ${{ matrix.os }}
9979
timeout-minutes: 10
10080
strategy:
10181
fail-fast: false
10282
matrix:
103-
python-version: ['3.12']
83+
python-version: ['3.11', '3.12', '3.13']
10484
os: [ubuntu-latest]
10585
steps:
10686
- uses: actions/checkout@v4

docs/benchmarks/hires/plot.md

Lines changed: 0 additions & 108 deletions
This file was deleted.

docs/benchmarks/hires/plot_ts.npy

-17.8 KB
Binary file not shown.

docs/benchmarks/hires/plot_ys.npy

-142 KB
Binary file not shown.

docs/benchmarks/hires/results.npy

-1.72 KB
Binary file not shown.

docs/benchmarks/lotkavolterra/plot.md

Lines changed: 0 additions & 115 deletions
This file was deleted.
-6.73 KB
Binary file not shown.
-13.3 KB
Binary file not shown.
-2.91 KB
Binary file not shown.

docs/benchmarks/pleiades/plot.md

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)