Skip to content

Changes due to deprecations in Cubed #27

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

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 2 additions & 4 deletions tests/benchmarks/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import cubed
import cubed.random
from cubed.core.optimization import multiple_inputs_optimize_dag, simple_optimize_dag
from cubed.extensions.rich import RichProgressBar
from cubed.diagnostics.rich import RichProgressBar

from ..utils import run

Expand Down Expand Up @@ -47,9 +47,7 @@ def test_quadratic_means_xarray(tmp_path, runtime, benchmark_all, optimizer, t_l
quad = ds**2
quad["uv"] = ds.anom_u * ds.anom_v
print(quad)
result = quad.mean(
"time", skipna=False, use_new_impl=True, split_every=10
)
result = quad.mean("time", skipna=False, split_every=10)

if optimizer == "new-optimizer":
opt_fn = partial(multiple_inputs_optimize_dag, max_total_num_input_blocks=20)
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def benchmark_memory(test_run_benchmark):
.. code-block:: python

def test_something(benchmark_memory):
history = cubed.extensions.history.HistoryCallback()
history = cubed.diagnostics.history.HistoryCallback()
with benchmark_memory(history):
cubed.compute(*arrs, callbacks=[history])
"""
Expand Down Expand Up @@ -259,7 +259,7 @@ def benchmark_tasks(test_run_benchmark):
.. code-block:: python

def test_something(benchmark_tasks):
history = cubed.extensions.history.HistoryCallback()
history = cubed.diagnostics.history.HistoryCallback()
with benchmark_tasks(history):
cubed.compute(*arrs, callbacks=[history])
"""
Expand Down Expand Up @@ -305,7 +305,7 @@ def benchmark_all(
.. code-block:: python

def test_something(benchmark_all):
history = cubed.extensions.history.HistoryCallback()
history = cubed.diagnostics.history.HistoryCallback()
with benchmark_all(history):
cubed.compute(*arrs, callbacks=[history])

Expand Down
4 changes: 2 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import yaml

import cubed
from cubed.extensions.history import HistoryCallback
from cubed.extensions.timeline import TimelineVisualizationCallback
from cubed.diagnostics.history import HistoryCallback
from cubed.diagnostics.timeline import TimelineVisualizationCallback
from cubed.spec import spec_from_config
from cubed import config

Expand Down