Skip to content

TypeError: load() got an unexpected keyword argument 'return_state_dict' #8453

@KumoLiu

Description

@KumoLiu
[2025-05-15T16:00:42.321Z] 

[2025-05-15T16:00:42.321Z] ======================================================================

[2025-05-15T16:00:42.321Z] ERROR: test_load_weights_0 (tests.bundle.test_bundle_download.TestLoad)

[2025-05-15T16:00:42.321Z] ----------------------------------------------------------------------

[2025-05-15T16:00:42.321Z] Traceback (most recent call last):

[2025-05-15T16:00:42.321Z]   File "/usr/local/lib/python3.10/dist-packages/parameterized/parameterized.py", line 620, in standalone_func

[2025-05-15T16:00:42.321Z]     return func(*(a + p.args), **p.kwargs, **kw)

[2025-05-15T16:00:42.321Z]   File "/opt/monai/tests/bundle/test_bundle_download.py", line 275, in test_load_weights

[2025-05-15T16:00:42.321Z]     weights = load(

[2025-05-15T16:00:42.321Z] TypeError: load() got an unexpected keyword argument 'return_state_dict'

[2025-05-15T16:00:42.321Z] 

[2025-05-15T16:00:42.321Z] ======================================================================

[2025-05-15T16:00:42.321Z] ERROR: test_load_weights_with_net_override_0_spleen_ct_segmentation (tests.bundle.test_bundle_download.TestLoad)

[2025-05-15T16:00:42.321Z] ----------------------------------------------------------------------

[2025-05-15T16:00:42.321Z] Traceback (most recent call last):

[2025-05-15T16:00:42.321Z]   File "/usr/local/lib/python3.10/dist-packages/parameterized/parameterized.py", line 620, in standalone_func

[2025-05-15T16:00:42.321Z]     return func(*(a + p.args), **p.kwargs, **kw)

[2025-05-15T16:00:42.321Z]   File "/opt/monai/tests/bundle/test_bundle_download.py", line 346, in test_load_weights_with_net_override

[2025-05-15T16:00:42.321Z]     model = load(

[2025-05-15T16:00:42.321Z] TypeError: load() got an unexpected keyword argument 'return_state_dict'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions