Skip to content

test_scale_intensity_range_percentiles error #3620

@wyli

Description

@wyli

Describe the bug
a frequent error for the recent unit testing, e.g. the log here: https://github.com/Project-MONAI/MONAI/actions/runs/1674183498

======================================================================
FAIL: test_channel_wise (tests.test_scale_intensity_range_percentiles.TestScaleIntensityRangePercentiles)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/test_scale_intensity_range_percentiles.py", line 86, in test_channel_wise
    assert_allclose(result, p(expected), rtol=1e-4)
  File "/home/jenkins/agent/workspace/MONAI-premerge/monai/tests/utils.py", line 92, in assert_allclose
    np.testing.assert_allclose(actual, desired, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/numpy/testing/_private/utils.py", line 1531, in assert_allclose
    verbose=verbose, header=header, equal_nan=equal_nan)
  File "/usr/local/lib/python3.7/dist-packages/numpy/testing/_private/utils.py", line 844, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=0.0001, atol=0

Mismatched elements: 496 / 8192 (6.05%)
Max absolute difference: 255.
Max relative difference: 1.008
 x: array([[[0., 0., 0., ..., 0., 0., 0.],
        [0., 0., 0., ..., 0., 0., 0.],
        [0., 0., 0., ..., 0., 0., 0.],...
 y: array([[[0, 0, 0, ..., 0, 0, 0],
        [0, 0, 0, ..., 0, 0, 0],
        [0, 0, 0, ..., 0, 0, 0],...

----------------------------------------------------------------------
MONAI version: 0+unknown
Numpy version: 1.21.5
Pytorch version: 1.8.1+cu102
MONAI flags: HAS_EXT = True, USE_COMPILED = True
MONAI rev id: None

Optional dependencies:
Pytorch Ignite version: 0.4.7
Nibabel version: 3.2.1
scikit-image version: 0.19.1
Pillow version: 9.0.0
Tensorboard version: 2.7.0
gdown version: 4.2.0
TorchVision version: 0.9.1+cu102
tqdm version: 4.62.3
lmdb version: 1.3.0
psutil version: 5.9.0
pandas version: 1.3.5
einops version: 0.3.2
transformers version: 4.15.0
mlflow version: 1.22.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions