Skip to content

Commit d311ff6

Browse files
committed
Changes due to deprecations in Cubed
1 parent 0e9a6f3 commit d311ff6

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

tests/benchmarks/test_array.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import cubed
99
import cubed.random
1010
from cubed.core.optimization import multiple_inputs_optimize_dag, simple_optimize_dag
11-
from cubed.extensions.rich import RichProgressBar
11+
from cubed.diagnostics.rich import RichProgressBar
1212

1313
from ..utils import run
1414

@@ -47,9 +47,7 @@ def test_quadratic_means_xarray(tmp_path, runtime, benchmark_all, optimizer, t_l
4747
quad = ds**2
4848
quad["uv"] = ds.anom_u * ds.anom_v
4949
print(quad)
50-
result = quad.mean(
51-
"time", skipna=False, use_new_impl=True, split_every=10
52-
)
50+
result = quad.mean("time", skipna=False, split_every=10)
5351

5452
if optimizer == "new-optimizer":
5553
opt_fn = partial(multiple_inputs_optimize_dag, max_total_num_input_blocks=20)

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def benchmark_memory(test_run_benchmark):
212212
.. code-block:: python
213213
214214
def test_something(benchmark_memory):
215-
history = cubed.extensions.history.HistoryCallback()
215+
history = cubed.diagnostics.history.HistoryCallback()
216216
with benchmark_memory(history):
217217
cubed.compute(*arrs, callbacks=[history])
218218
"""
@@ -259,7 +259,7 @@ def benchmark_tasks(test_run_benchmark):
259259
.. code-block:: python
260260
261261
def test_something(benchmark_tasks):
262-
history = cubed.extensions.history.HistoryCallback()
262+
history = cubed.diagnostics.history.HistoryCallback()
263263
with benchmark_tasks(history):
264264
cubed.compute(*arrs, callbacks=[history])
265265
"""
@@ -305,7 +305,7 @@ def benchmark_all(
305305
.. code-block:: python
306306
307307
def test_something(benchmark_all):
308-
history = cubed.extensions.history.HistoryCallback()
308+
history = cubed.diagnostics.history.HistoryCallback()
309309
with benchmark_all(history):
310310
cubed.compute(*arrs, callbacks=[history])
311311

tests/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import yaml
33

44
import cubed
5-
from cubed.extensions.history import HistoryCallback
6-
from cubed.extensions.timeline import TimelineVisualizationCallback
5+
from cubed.diagnostics.history import HistoryCallback
6+
from cubed.diagnostics.timeline import TimelineVisualizationCallback
77
from cubed.spec import spec_from_config
88
from cubed import config
99

0 commit comments

Comments
 (0)