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

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

Open
kerenzhou062 opened this issue May 6, 2024 · 1 comment

Comments

@kerenzhou062
Copy link

kerenzhou062 commented May 6, 2024

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`

@umahsn
Copy link
Collaborator

umahsn commented May 6, 2024

Hi,

Are you using the latest commit? This bug was fixed in commit 2f7c90d, so if you use the latest version you should not have this error. Please use git pull command within DeepMod2 repository to pull the latest changes to the code.

Best,
Umair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants