diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b7529797f..7c1df4354 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 diff --git a/benchmarks/bench_cbma.py b/benchmarks/bench_cbma.py index 52fb27be4..dd6cf83b4 100644 --- a/benchmarks/bench_cbma.py +++ b/benchmarks/bench_cbma.py @@ -1,3 +1,5 @@ +import os + import nimare from nimare.meta.cbma import ALE, MKDADensity, KDA, MKDAChi2 from nimare.tests.utils import get_test_data_path @@ -5,8 +7,7 @@ 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)