Skip to content

Error from nightly build -- tests.test_rand_weighted_cropd.TestRandWeightedCrop #3119

@wyli

Description

@wyli

Describe the bug

======================================================================
ERROR: test_rand_weighted_crop_small_roi (tests.test_rand_weighted_cropd.TestRandWeightedCrop)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/agent/workspace/Monai-pytorch-versions/tests/test_rand_weighted_cropd.py", line 33, in test_rand_weighted_crop_small_roi
    result = crop(d)
  File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/transforms/croppad/dictionary.py", line 963, in __call__
    self.randomize(d[self.w_key])
  File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/transforms/croppad/dictionary.py", line 958, in randomize
    spatial_size=self.spatial_size, w=weight_map[0], n_samples=self.num_samples, r_state=self.R
  File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/transforms/utils.py", line 397, in weighted_patch_samples
    idx = searchsorted(v, r * v[-1], right=True)
  File "/home/jenkins/agent/workspace/Monai-pytorch-versions/monai/transforms/utils_pytorch_numpy_unification.py", line 301, in searchsorted
    return torch.searchsorted(a, v, right=right)  # type: ignore
AttributeError: module 'torch' has no attribute 'searchsorted'
================================
MONAI version: 0.7.0+47.ge0f84f2a
Numpy version: 1.18.1
Pytorch version: 1.5.1
MONAI flags: HAS_EXT = True, USE_COMPILED = True
MONAI rev id: e0f84f2a858bbcab341251898438a53dc9700095

Optional dependencies:
Pytorch Ignite version: 0.4.6
Nibabel version: 3.2.1
scikit-image version: 0.15.0
Pillow version: 8.3.2
Tensorboard version: 2.1.0
gdown version: 4.0.2
TorchVision version: 0.6.1
tqdm version: 4.62.3
lmdb version: 0.98
psutil version: 5.6.7
pandas version: 0.24.2
einops version: 0.3.2
transformers version: 4.11.3
mlflow version: 1.20.2

For details about installing the optional dependencies, please visit:
    https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions