Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] add airspeed velocity benchmark #898

Closed
wants to merge 10 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update benchmark
jdkent committed Aug 14, 2024
commit 3e6b4791c3c8d34b6bdf488d2ae15b3a8706a7ff
28 changes: 9 additions & 19 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -10,24 +10,14 @@ on:

jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install asv
pip install -r requirements.txt
- name: Run benchmarks
run: |
asv run NEW --show-stderr --python=same
asv compare -s 1.2 NEW
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/checkout@v3
- run: git fetch origin $GITHUB_BASE_REF:base $GITHUB_REF:pr
- run: pip install asv virtualenv
- run: asv machine --yes
- run: asv continuous base pr --strict -e
7 changes: 4 additions & 3 deletions benchmarks/bench_cbma.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os

import nimare
from nimare.meta.cbma import ALE, MKDADensity, KDA, MKDAChi2
from nimare.tests.utils import get_test_data_path


class TimeCBMA:
def setup(self):
self.dataset = nimare.dataset.Dataset(get_test_data_path())

self.dataset = nimare.dataset.Dataset(os.path.join(get_test_data_path(), "test_pain_dataset.json"))
def time_ale(self):
meta = ALE()
meta.fit(self.dataset)
@@ -21,4 +22,4 @@ def time_kda(self):

def time_mkdachi2(self):
meta = MKDAChi2()
meta.fit(self.dataset)
meta.fit(self.dataset, self.dataset)