Skip to content
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

test_swin_unetr #7112

Closed
wyli opened this issue Oct 11, 2023 · 0 comments · Fixed by #7110
Closed

test_swin_unetr #7112

wyli opened this issue Oct 11, 2023 · 0 comments · Fixed by #7110
Assignees
Labels
bug Something isn't working

Comments

@wyli
Copy link
Contributor

wyli commented Oct 11, 2023

10:44:54  ======================================================================
10:44:54  ERROR: test_filter_swinunetr_0 (tests.test_swin_unetr.TestSWINUNETR)
10:44:54  ----------------------------------------------------------------------
10:44:54  Traceback (most recent call last):
10:44:54    File "/usr/local/lib/python3.10/dist-packages/parameterized/parameterized.py", line 620, in standalone_func
10:44:54      return func(*(a + p.args), **p.kwargs, **kw)
10:44:54    File "/home/jenkins/agent/workspace/MONAI-latest-docker-test/tests/test_swin_unetr.py", line 121, in test_filter_swinunetr
10:44:54      ssl_weight = torch.load(weight_path)["model"]
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1016, in load
10:44:54      return _load(opened_zipfile,
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1424, in _load
10:44:54      result = unpickler.load()
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1394, in persistent_load
10:44:54      typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1368, in load_tensor
10:44:54      wrap_storage=restore_location(storage, location),
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 383, in default_restore_location
10:44:54      result = fn(storage, location)
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 276, in _cuda_deserialize
10:44:54      device = validate_cuda_device(location)
10:44:54    File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 260, in validate_cuda_device
10:44:54      raise RuntimeError('Attempting to deserialize object on a CUDA '
10:44:54  RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
10:44:54  
@wyli wyli added the bug Something isn't working label Oct 11, 2023
@wyli wyli self-assigned this Oct 11, 2023
wyli added a commit to wyli/MONAI that referenced this issue Oct 11, 2023
Signed-off-by: Wenqi Li <[email protected]>
wyli added a commit that referenced this issue Oct 11, 2023
part of #7017
fixes #7112

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Wenqi Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant