Skip to content

module 'torch.hub' has no attribute 'get_dir' in pytorch 1.5 #2345

@wyli

Description

@wyli

Describe the bug
from the nightly tests with PyTorch 1.5 https://github.com/Project-MONAI/MONAI/runs/2779850136?check_suite_focus=true:

======================================================================
ERROR: test_load_ckpt_2 (tests.test_mmar_download.TestMMMARDownload)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/parameterized/parameterized.py", line 533, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/__w/MONAI/MONAI/tests/test_mmar_download.py", line 97, in test_load_ckpt
    output = load_from_mmar(**input_args)
  File "/__w/MONAI/MONAI/monai/apps/mmars/mmars.py", line 109, in load_from_mmar
    model_dir = download_mmar(item=item, mmar_dir=mmar_dir, progress=progress)
  File "/__w/MONAI/MONAI/monai/apps/mmars/mmars.py", line 72, in download_mmar
    mmar_dir = os.path.join(torch.hub.get_dir(), "mmars")
AttributeError: module 'torch.hub' has no attribute 'get_dir'

----------------------------------------------------------------------

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions