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

sh ./prune.sh games SASRec 0.3 50 log 0 运行时出错 #4

Open
wuren519 opened this issue Sep 26, 2024 · 1 comment
Open

sh ./prune.sh games SASRec 0.3 50 log 0 运行时出错 #4

wuren519 opened this issue Sep 26, 2024 · 1 comment

Comments

@wuren519
Copy link

Traceback (most recent call last):
File "prune.py", line 15, in
effort = get_effort_score(args)
File "/workspace/code/DEALRec/code/prune/effort_score.py", line 154, in get_effort_score
trainer = Effort_Trainer(
File "/root/anaconda3/envs/DEALRec/lib/python3.8/site-packages/transformers/trainer.py", line 504, in init
self._move_model_to_device(model, args.device)
File "/root/anaconda3/envs/DEALRec/lib/python3.8/site-packages/transformers/trainer.py", line 728, in _move_model_to_device
model = model.to(device)
AttributeError: '_IncompatibleKeys' object has no attribute 'to'

@Linxyhaha
Copy link
Owner

Linxyhaha commented Oct 15, 2024

Traceback (most recent call last): File "prune.py", line 15, in effort = get_effort_score(args) File "/workspace/code/DEALRec/code/prune/effort_score.py", line 154, in get_effort_score trainer = Effort_Trainer( File "/root/anaconda3/envs/DEALRec/lib/python3.8/site-packages/transformers/trainer.py", line 504, in init self._move_model_to_device(model, args.device) File "/root/anaconda3/envs/DEALRec/lib/python3.8/site-packages/transformers/trainer.py", line 728, in _move_model_to_device model = model.to(device) AttributeError: '_IncompatibleKeys' object has no attribute 'to'

It seems that the model is not successfully loaded. Please ensure the model is successfully loaded or initialized.

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