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

Add asv benchmark jobs to CI #5796

Merged
merged 123 commits into from
Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
ff0b563
Create benchmark-cron.yml
Illviljan Sep 14, 2021
bfb317c
move config
Illviljan Sep 14, 2021
6a3a91e
Create benchmarks.yml
Illviljan Sep 14, 2021
718ab63
Update asv.conf.json
Illviljan Sep 14, 2021
02daf51
Update asv.conf.json
Illviljan Sep 14, 2021
b5aebef
Create benchmarks-label-triggered.yml
Illviljan Sep 14, 2021
156a6f8
newlines at end
Illviljan Sep 14, 2021
448d92c
Update benchmark_cron.yml
Illviljan Sep 14, 2021
03c5c63
Delete benchmark_cron.yml
Illviljan Sep 14, 2021
2465696
Update benchmark-cron.yml
Illviljan Sep 14, 2021
13a1cee
rename
Illviljan Sep 14, 2021
9f79f15
Create benchmarks-no-label-triggered.yml
Illviljan Sep 14, 2021
5630aa2
Create README_CI.md
Illviljan Sep 15, 2021
30c801e
Update benchmarks-no-label-triggered.yml
Illviljan Sep 15, 2021
069acaa
Remove some test workflows.
Illviljan Sep 15, 2021
3b15f98
Update benchmarks-no-label-triggered.yml
Illviljan Sep 15, 2021
19727fb
Update benchmarks-no-label-triggered.yml
Illviljan Sep 15, 2021
8e9db9e
Update asv.conf.json
Illviljan Sep 15, 2021
7fdb4bd
Update asv.conf.json
Illviljan Sep 15, 2021
07b3b39
Remove label triggered workflow
Illviljan Sep 15, 2021
eac0236
Update benchmarks.yml
Illviljan Sep 15, 2021
459dc04
Add _skip_slow
Illviljan Sep 15, 2021
fab96b5
Update __init__.py
Illviljan Sep 15, 2021
1cd72dd
Update __init__.py
Illviljan Sep 15, 2021
15e03d0
global asv directory
Illviljan Sep 16, 2021
7b85bea
Update benchmarks.yml
Illviljan Sep 16, 2021
eef9311
Update benchmarks.yml
Illviljan Sep 16, 2021
0c9ddda
Update benchmarks.yml
Illviljan Sep 16, 2021
b72c984
Update benchmarks.yml
Illviljan Sep 16, 2021
888e275
Update benchmarks.yml
Illviljan Sep 16, 2021
4abd9c4
Update benchmarks.yml
Illviljan Sep 16, 2021
5f2bfec
Update benchmarks.yml
Illviljan Sep 16, 2021
1a04140
Update benchmarks.yml
Illviljan Sep 16, 2021
69316c4
Update repr.py
Illviljan Sep 16, 2021
61287e2
Update benchmarks.yml
Illviljan Sep 16, 2021
e361c5c
Update benchmarks.yml
Illviljan Sep 16, 2021
49e33fc
Update benchmarks.yml
Illviljan Sep 16, 2021
4c1adea
Create pandas.py
Illviljan Sep 16, 2021
9826976
Update pandas.py
Illviljan Sep 16, 2021
f2242d3
Update pandas.py
Illviljan Sep 16, 2021
64dd4ea
Create interp.py
Illviljan Sep 16, 2021
607916b
Update interp.py
Illviljan Sep 16, 2021
e4a2011
Update interp.py
Illviljan Sep 16, 2021
115f02c
Update interp.py
Illviljan Sep 16, 2021
468489b
check combine
Illviljan Sep 16, 2021
72e195f
Update combine.py
Illviljan Sep 16, 2021
15438bd
test missing
Illviljan Sep 16, 2021
f71630b
Update dataarray_missing.py
Illviljan Sep 16, 2021
46caf1d
Update dataarray_missing.py
Illviljan Sep 16, 2021
17b28f7
Update dataarray_missing.py
Illviljan Sep 16, 2021
ecde362
Update dataarray_missing.py
Illviljan Sep 16, 2021
94bc5ed
Update dataarray_missing.py
Illviljan Sep 16, 2021
66cb6e8
Update dataarray_missing.py
Illviljan Sep 16, 2021
2c481c3
Update dataarray_missing.py
Illviljan Sep 16, 2021
4db5d7e
Update dataarray_missing.py
Illviljan Sep 16, 2021
b9a8462
Update dataarray_missing.py
Illviljan Sep 16, 2021
1efb890
test unstacking
Illviljan Sep 16, 2021
603bec5
Update unstacking.py
Illviljan Sep 16, 2021
e598c29
test reindexing
Illviljan Sep 16, 2021
8fb88dc
Update reindexing.py
Illviljan Sep 16, 2021
19041ec
Update reindexing.py
Illviljan Sep 16, 2021
2bf57a2
test rolling
Illviljan Sep 16, 2021
46c1c43
Update rolling.py
Illviljan Sep 16, 2021
2a694ca
Update rolling.py
Illviljan Sep 16, 2021
278c858
Update rolling.py
Illviljan Sep 16, 2021
f1d9bef
Update rolling.py
Illviljan Sep 16, 2021
7b80778
add the tests back
Illviljan Sep 17, 2021
5e66930
Update dataarray_missing.py
Illviljan Sep 17, 2021
fa5855e
Merge branch 'pydata:main' into asv-benchmark-cron
Illviljan Sep 20, 2021
6553d58
Update rolling.py
Illviljan Sep 21, 2021
c068f8c
Update rolling.py
Illviljan Sep 22, 2021
5a846cc
nanmean gets divide by zero errors
Illviljan Sep 22, 2021
2745cbf
skip dataset_io
Illviljan Sep 24, 2021
5e639aa
Update dataset_io.py
Illviljan Sep 24, 2021
cffc06a
Update dataset_io.py
Illviljan Sep 24, 2021
2a4d32f
Update indexing.py
Illviljan Sep 25, 2021
7776a82
Update indexing.py
Illviljan Sep 25, 2021
1aaaa71
use parametrized
Illviljan Sep 27, 2021
0a378b5
Update indexing.py
Illviljan Sep 27, 2021
2e076bb
Update indexing.py
Illviljan Sep 27, 2021
89e203e
Update indexing.py
Illviljan Sep 28, 2021
fc6a2b5
Update indexing.py
Illviljan Sep 28, 2021
c1d85f1
Update whats-new.rst
Illviljan Sep 28, 2021
0278acc
Merge branch 'pydata:main' into asv-benchmark-cron
Illviljan Sep 28, 2021
b9496ae
Update dataset_io.py
Illviljan Sep 29, 2021
21f7a91
Update dataset_io.py
Illviljan Sep 29, 2021
d1aeeda
Run benchmarks with labels only, comment out ccache
Illviljan Oct 1, 2021
aeab4ca
Merge branch 'main' into asv-benchmark-cron
Illviljan Oct 1, 2021
b7b3070
Update benchmarks.yml
Illviljan Oct 1, 2021
dafbea6
Update benchmarks.yml
Illviljan Oct 1, 2021
206ac72
Update benchmarks.yml
Illviljan Oct 1, 2021
6b5c688
Update benchmarks.yml
Illviljan Oct 1, 2021
aad08ac
Revert "Merge branch 'main' into asv-benchmark-cron"
Illviljan Oct 1, 2021
7815882
Revert "Update benchmarks.yml"
Illviljan Oct 1, 2021
087ff76
Revert "Revert "Update benchmarks.yml""
Illviljan Oct 1, 2021
2b7858c
Update benchmarks.yml
Illviljan Oct 1, 2021
53cd0a7
test triggering with a label
Illviljan Oct 1, 2021
376e9e5
Update benchmarks.yml
Illviljan Oct 1, 2021
de63ee0
Update benchmarks.yml
Illviljan Oct 1, 2021
771b9b5
Merge branch 'main' into asv-benchmark-cron
Illviljan Oct 5, 2021
eac2545
Revert "Revert "Merge branch 'main' into asv-benchmark-cron""
Illviljan Oct 5, 2021
a66eef5
Update benchmarks.yml
Illviljan Oct 5, 2021
884b24a
Update benchmarks.yml
Illviljan Oct 5, 2021
743ba62
Update benchmarks.yml
Illviljan Oct 5, 2021
4d7ae6d
Update benchmarks.yml
Illviljan Oct 5, 2021
e3de111
Update benchmarks.yml
Illviljan Oct 5, 2021
431cfe6
Update benchmarks.yml
Illviljan Oct 5, 2021
6e73f9b
Update benchmarks.yml
Illviljan Oct 5, 2021
24ca03e
Update benchmarks.yml
Illviljan Oct 5, 2021
5c36e26
remove ccache
Illviljan Oct 6, 2021
919d794
Update benchmarks.yml
Illviljan Oct 6, 2021
91edc08
Try something else than mamba
Illviljan Oct 6, 2021
318e99e
Update benchmarks.yml
Illviljan Oct 6, 2021
6a2b855
Update benchmarks.yml
Illviljan Oct 6, 2021
321a761
test missing again
Illviljan Oct 6, 2021
1eba65c
Update dataarray_missing.py
Illviljan Oct 6, 2021
56556f1
Update dataarray_missing.py
Illviljan Oct 6, 2021
8f08506
Update dataarray_missing.py
Illviljan Oct 6, 2021
d1b908a
Update dataarray_missing.py
Illviljan Oct 6, 2021
8f262f9
Update dataarray_missing.py
Illviljan Oct 7, 2021
0b7b1a0
Update dataarray_missing.py
Illviljan Oct 7, 2021
712a453
Update dataarray_missing.py
Illviljan Oct 7, 2021
70cd679
add back tests
Illviljan Oct 7, 2021
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
77 changes: 77 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Benchmark

on:
Illviljan marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
types: [opened, reopened, synchronize, labeled]
workflow_dispatch:

jobs:
benchmark:
if: |
${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark')
&& github.event_name == 'pull_request'
|| github.event_name == 'workflow_dispatch' }}
name: Linux
runs-on: ubuntu-20.04
env:
ASV_DIR: "./asv_bench"

steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
# installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh

- name: Setup some dependencies
shell: bash -l {0}
run: |
pip install asv
sudo apt-get update -y

- name: Run benchmarks
shell: bash -l {0}
id: benchmark
env:
OPENBLAS_NUM_THREADS: 1
MKL_NUM_THREADS: 1
OMP_NUM_THREADS: 1
ASV_FACTOR: 1.5
ASV_SKIP_SLOW: 1
run: |
set -x
# ID this runner
asv machine --yes
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
echo "Contender: ${GITHUB_SHA} (${{ github.event.pull_request.head.label }})"
# Use mamba for env creation
# export CONDA_EXE=$(which mamba)
export CONDA_EXE=$(which conda)
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \
| sed "/Traceback \|failed$\|PERFORMANCE DECREASED/ s/^/::error::/" \
| tee benchmarks.log
# Report and export results for subsequent steps
if grep "Traceback \|failed\|PERFORMANCE DECREASED" benchmarks.log > /dev/null ; then
exit 1
fi
working-directory: ${{ env.ASV_DIR }}

- name: Add instructions to artifact
if: always()
run: |
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v2
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
path: ${{ env.ASV_DIR }}/.asv/results
122 changes: 122 additions & 0 deletions asv_bench/benchmarks/README_CI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Benchmark CI

<!-- Author: @jaimergp -->
<!-- Last updated: 2021.07.06 -->
<!-- Describes the work done as part of https://github.com/scikit-image/scikit-image/pull/5424 -->

## How it works

The `asv` suite can be run for any PR on GitHub Actions (check workflow `.github/workflows/benchmarks.yml`) by adding a `run-benchmark` label to said PR. This will trigger a job that will run the benchmarking suite for the current PR head (merged commit) against the PR base (usually `main`).

We use `asv continuous` to run the job, which runs a relative performance measurement. This means that there's no state to be saved and that regressions are only caught in terms of performance ratio (absolute numbers are available but they are not useful since we do not use stable hardware over time). `asv continuous` will:

* Compile `scikit-image` for _both_ commits. We use `ccache` to speed up the process, and `mamba` is used to create the build environments.
* Run the benchmark suite for both commits, _twice_ (since `processes=2` by default).
* Generate a report table with performance ratios:
* `ratio=1.0` -> performance didn't change.
* `ratio<1.0` -> PR made it slower.
* `ratio>1.0` -> PR made it faster.

Due to the sensitivity of the test, we cannot guarantee that false positives are not produced. In practice, values between `(0.7, 1.5)` are to be considered part of the measurement noise. When in doubt, running the benchmark suite one more time will provide more information about the test being a false positive or not.

## Running the benchmarks on GitHub Actions

1. On a PR, add the label `run-benchmark`.
2. The CI job will be started. Checks will appear in the usual dashboard panel above the comment box.
3. If more commits are added, the label checks will be grouped with the last commit checks _before_ you added the label.
4. Alternatively, you can always go to the `Actions` tab in the repo and [filter for `workflow:Benchmark`](https://github.com/scikit-image/scikit-image/actions?query=workflow%3ABenchmark). Your username will be assigned to the `actor` field, so you can also filter the results with that if you need it.

## The artifacts

The CI job will also generate an artifact. This is the `.asv/results` directory compressed in a zip file. Its contents include:

* `fv-xxxxx-xx/`. A directory for the machine that ran the suite. It contains three files:
* `<baseline>.json`, `<contender>.json`: the benchmark results for each commit, with stats.
* `machine.json`: details about the hardware.
* `benchmarks.json`: metadata about the current benchmark suite.
* `benchmarks.log`: the CI logs for this run.
* This README.

## Re-running the analysis

Although the CI logs should be enough to get an idea of what happened (check the table at the end), one can use `asv` to run the analysis routines again.

1. Uncompress the artifact contents in the repo, under `.asv/results`. This is, you should see `.asv/results/benchmarks.log`, not `.asv/results/something_else/benchmarks.log`. Write down the machine directory name for later.
2. Run `asv show` to see your available results. You will see something like this:

```
$> asv show

Commits with results:

Machine : Jaimes-MBP
Environment: conda-py3.9-cython-numpy1.20-scipy

00875e67

Machine : fv-az95-499
Environment: conda-py3.7-cython-numpy1.17-pooch-scipy

8db28f02
3a305096
```

3. We are interested in the commits for `fv-az95-499` (the CI machine for this run). We can compare them with `asv compare` and some extra options. `--sort ratio` will show largest ratios first, instead of alphabetical order. `--split` will produce three tables: improved, worsened, no changes. `--factor 1.5` tells `asv` to only complain if deviations are above a 1.5 ratio. `-m` is used to indicate the machine ID (use the one you wrote down in step 1). Finally, specify your commit hashes: baseline first, then contender!

```
$> asv compare --sort ratio --split --factor 1.5 -m fv-az95-499 8db28f02 3a305096

Benchmarks that have stayed the same:

before after ratio
[8db28f02] [3a305096]
<ci-benchmark-check~9^2>
n/a n/a n/a benchmark_restoration.RollingBall.time_rollingball_ndim
1.23±0.04ms 1.37±0.1ms 1.12 benchmark_transform_warp.WarpSuite.time_to_float64(<class 'numpy.float64'>, 128, 3)
5.07±0.1μs 5.59±0.4μs 1.10 benchmark_transform_warp.ResizeLocalMeanSuite.time_resize_local_mean(<class 'numpy.float32'>, (192, 192, 192), (192, 192, 192))
1.23±0.02ms 1.33±0.1ms 1.08 benchmark_transform_warp.WarpSuite.time_same_type(<class 'numpy.float32'>, 128, 3)
9.45±0.2ms 10.1±0.5ms 1.07 benchmark_rank.Rank3DSuite.time_3d_filters('majority', (32, 32, 32))
23.0±0.9ms 24.6±1ms 1.07 benchmark_interpolation.InterpolationResize.time_resize((80, 80, 80), 0, 'symmetric', <class 'numpy.float64'>, True)
38.7±1ms 41.1±1ms 1.06 benchmark_transform_warp.ResizeLocalMeanSuite.time_resize_local_mean(<class 'numpy.float32'>, (2048, 2048), (192, 192, 192))
4.97±0.2μs 5.24±0.2μs 1.05 benchmark_transform_warp.ResizeLocalMeanSuite.time_resize_local_mean(<class 'numpy.float32'>, (2048, 2048), (2048, 2048))
4.21±0.2ms 4.42±0.3ms 1.05 benchmark_rank.Rank3DSuite.time_3d_filters('gradient', (32, 32, 32))

...
```

If you want more details on a specific test, you can use `asv show`. Use `-b pattern` to filter which tests to show, and then specify a commit hash to inspect:

```
$> asv show -b time_to_float64 8db28f02

Commit: 8db28f02 <ci-benchmark-check~9^2>

benchmark_transform_warp.WarpSuite.time_to_float64 [fv-az95-499/conda-py3.7-cython-numpy1.17-pooch-scipy]
ok
=============== ============= ========== ============= ========== ============ ========== ============ ========== ============
-- N / order
--------------- --------------------------------------------------------------------------------------------------------------
dtype_in 128 / 0 128 / 1 128 / 3 1024 / 0 1024 / 1 1024 / 3 4096 / 0 4096 / 1 4096 / 3
=============== ============= ========== ============= ========== ============ ========== ============ ========== ============
numpy.uint8 2.56±0.09ms 523±30μs 1.28±0.05ms 130±3ms 28.7±2ms 81.9±3ms 2.42±0.01s 659±5ms 1.48±0.01s
numpy.uint16 2.48±0.03ms 530±10μs 1.28±0.02ms 130±1ms 30.4±0.7ms 81.1±2ms 2.44±0s 653±3ms 1.47±0.02s
numpy.float32 2.59±0.1ms 518±20μs 1.27±0.01ms 127±3ms 26.6±1ms 74.8±2ms 2.50±0.01s 546±10ms 1.33±0.02s
numpy.float64 2.48±0.04ms 513±50μs 1.23±0.04ms 134±3ms 30.7±2ms 85.4±2ms 2.55±0.01s 632±4ms 1.45±0.01s
=============== ============= ========== ============= ========== ============ ========== ============ ========== ============
started: 2021-07-06 06:14:36, duration: 1.99m
```

## Other details

### Skipping slow or demanding tests

To minimize the time required to run the full suite, we trimmed the parameter matrix in some cases and, in others, directly skipped tests that ran for too long or require too much memory. Unlike `pytest`, `asv` does not have a notion of marks. However, you can `raise NotImplementedError` in the setup step to skip a test. In that vein, a new private function is defined at `benchmarks.__init__`: `_skip_slow`. This will check if the `ASV_SKIP_SLOW` environment variable has been defined. If set to `1`, it will raise `NotImplementedError` and skip the test. To implement this behavior in other tests, you can add the following attribute:

```python
from . import _skip_slow # this function is defined in benchmarks.__init__

def time_something_slow():
pass

time_something.setup = _skip_slow
```
19 changes: 19 additions & 0 deletions asv_bench/benchmarks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import itertools
import os

import numpy as np

Expand Down Expand Up @@ -46,3 +47,21 @@ def randint(low, high=None, size=None, frac_minus=None, seed=0):
x.flat[inds] = -1

return x


def _skip_slow():
"""
Use this function to skip slow or highly demanding tests.

Use it as a `Class.setup` method or a `function.setup` attribute.

Examples
--------
>>> from . import _skip_slow
>>> def time_something_slow():
... pass
...
>>> time_something.setup = _skip_slow
"""
if os.environ.get("ASV_SKIP_SLOW", "0") == "1":
raise NotImplementedError("Skipping this test...")
2 changes: 1 addition & 1 deletion asv_bench/benchmarks/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Combine:
def setup(self):
"""Create 4 datasets with two different variables"""

t_size, x_size, y_size = 100, 900, 800
t_size, x_size, y_size = 50, 450, 400
t = np.arange(t_size)
data = np.random.randn(t_size, x_size, y_size)

Expand Down
120 changes: 63 additions & 57 deletions asv_bench/benchmarks/dataarray_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

import xarray as xr

from . import randn, requires_dask

try:
import dask # noqa: F401
except ImportError:
pass
from . import parameterized, randn, requires_dask


def make_bench_data(shape, frac_nan, chunks):
Expand All @@ -21,54 +16,65 @@ def make_bench_data(shape, frac_nan, chunks):
return da


def time_interpolate_na(shape, chunks, method, limit):
if chunks is not None:
requires_dask()
da = make_bench_data(shape, 0.1, chunks=chunks)
actual = da.interpolate_na(dim="time", method="linear", limit=limit)

if chunks is not None:
actual = actual.compute()


time_interpolate_na.param_names = ["shape", "chunks", "method", "limit"]
time_interpolate_na.params = (
[(3650, 200, 400), (100, 25, 25)],
[None, {"x": 25, "y": 25}],
["linear", "spline", "quadratic", "cubic"],
[None, 3],
)


def time_ffill(shape, chunks, limit):

da = make_bench_data(shape, 0.1, chunks=chunks)
actual = da.ffill(dim="time", limit=limit)

if chunks is not None:
actual = actual.compute()


time_ffill.param_names = ["shape", "chunks", "limit"]
time_ffill.params = (
[(3650, 200, 400), (100, 25, 25)],
[None, {"x": 25, "y": 25}],
[None, 3],
)


def time_bfill(shape, chunks, limit):

da = make_bench_data(shape, 0.1, chunks=chunks)
actual = da.bfill(dim="time", limit=limit)

if chunks is not None:
actual = actual.compute()


time_bfill.param_names = ["shape", "chunks", "limit"]
time_bfill.params = (
[(3650, 200, 400), (100, 25, 25)],
[None, {"x": 25, "y": 25}],
[None, 3],
)
def requires_bottleneck():
try:
import bottleneck # noqa: F401
except ImportError:
raise NotImplementedError()


class DataArrayMissingInterpolateNA:
def setup(self, shape, chunks, limit):
if chunks is not None:
requires_dask()
self.da = make_bench_data(shape, 0.1, chunks)

@parameterized(
["shape", "chunks", "limit"],
(
[(365, 75, 75)],
[None, {"x": 25, "y": 25}],
[None, 3],
),
)
def time_interpolate_na(self, shape, chunks, limit):
actual = self.da.interpolate_na(dim="time", method="linear", limit=limit)

if chunks is not None:
actual = actual.compute()


class DataArrayMissingBottleneck:
def setup(self, shape, chunks, limit):
requires_bottleneck()
if chunks is not None:
requires_dask()
self.da = make_bench_data(shape, 0.1, chunks)

@parameterized(
["shape", "chunks", "limit"],
(
[(365, 75, 75)],
[None, {"x": 25, "y": 25}],
[None, 3],
),
)
def time_ffill(self, shape, chunks, limit):
actual = self.da.ffill(dim="time", limit=limit)

if chunks is not None:
actual = actual.compute()

@parameterized(
["shape", "chunks", "limit"],
(
[(365, 75, 75)],
[None, {"x": 25, "y": 25}],
[None, 3],
),
)
def time_bfill(self, shape, chunks, limit):
actual = self.da.ffill(dim="time", limit=limit)

if chunks is not None:
actual = actual.compute()
Loading