Skip to content

--model 'transformer_r10.4.1_5khz_v4.3' has error "UnboundLocalError: local variable 'model' referenced before assignment " #24

@kerenzhou062

Description

@kerenzhou062

when running deepmod2 detect --model 'transformer_r10.4.1_5khz_v4.3', it throws error like:

Traceback (most recent call last):
File "/hpcf/authorized_apps/rhel8_apps/deepmod2/install/deepmod2-env2/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/hpcf/authorized_apps/rhel8_apps/deepmod2/install/deepmod2-env2/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/research/rgs01/applications/hpcf/authorized_apps/rhel8_apps/deepmod2/vendor/DeepMod2/src/detect.py", line 419, in process
model, model_config=get_model(params)
File "/research/rgs01/applications/hpcf/authorized_apps/rhel8_apps/deepmod2/vendor/DeepMod2/src/utils.py", line 108, in get_model
model.load_state_dict(checkpoint['model_state_dict'])
UnboundLocalError: local variable 'model' referenced before assignment`

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