Skip to content

Commit 300af37

Browse files
committed
fix tests
1 parent 3b23c7c commit 300af37

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: tests/test_bioimageio_collection.py

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def yield_bioimageio_yaml_urls() -> Iterable[ParameterSet]:
4545
"committed-turkey/1.2", # error deserializing VarianceScaling
4646
"creative-panda/1", # error deserializing Conv2D
4747
"dazzling-spider/0.1.0", # requires careamics
48+
"discreet-rooster/1", # error deserializing VarianceScaling
4849
"discreete-rooster/1", # error deserializing VarianceScaling
4950
"dynamic-t-rex/1", # needs update to 0.5 for scale_linear with axes processing
5051
"easy-going-sauropod/1", # CPU implementation of Conv3D currently only supports the NHWC tensor format.

Diff for: tests/test_proc_ops.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_zero_mean_unit_variance_fixed(tid: MemberId):
100100
]
101101
]
102102
),
103-
dims=("b", "c", "x"),
103+
dims=("b", "channel", "x"),
104104
)
105105
sample = Sample(members={tid: Tensor.from_xarray(data)}, stat={}, id=None)
106106
op(sample)
@@ -222,7 +222,7 @@ def test_combination_of_op_steps_with_dims_specified(tid: MemberId):
222222
],
223223
]
224224
),
225-
dims=("c", "x", "y"),
225+
dims=("channel", "x", "y"),
226226
)
227227

228228
op(sample)
@@ -337,7 +337,7 @@ def test_scale_range_axes(tid: MemberId):
337337
op = ScaleRange(tid, tid, lower_quantile, upper_quantile, eps=eps)
338338

339339
np_data = np.arange(18).reshape((2, 3, 3)).astype("float32")
340-
data = Tensor.from_xarray(xr.DataArray(np_data, dims=("c", "x", "y")))
340+
data = Tensor.from_xarray(xr.DataArray(np_data, dims=("channel", "x", "y")))
341341
sample = Sample(members={tid: data}, stat={}, id=None)
342342

343343
p_low_direct = lower_quantile.compute(sample)
@@ -355,7 +355,7 @@ def test_scale_range_axes(tid: MemberId):
355355
np.testing.assert_allclose(p_up_expected.squeeze(), sample.stat[upper_quantile])
356356

357357
exp_data = (np_data - p_low_expected) / (p_up_expected - p_low_expected + eps)
358-
expected = xr.DataArray(exp_data, dims=("c", "x", "y"))
358+
expected = xr.DataArray(exp_data, dims=("channel", "x", "y"))
359359

360360
op(sample)
361361
# NOTE xarray.testing.assert_allclose compares irrelavant properties here and fails although the result is correct
@@ -366,7 +366,7 @@ def test_sigmoid(tid: MemberId):
366366
from bioimageio.core.proc_ops import Sigmoid
367367

368368
shape = (3, 32, 32)
369-
axes = ("c", "y", "x")
369+
axes = ("channel", "y", "x")
370370
np_data = np.random.rand(*shape)
371371
data = xr.DataArray(np_data, dims=axes)
372372
sample = Sample(members={tid: Tensor.from_xarray(data)}, stat={}, id=None)

0 commit comments

Comments
 (0)