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

[🐛BUG] 运行SHAN时报错 #1486

Closed
ShelveyJ opened this issue Oct 12, 2022 · 1 comment
Closed

[🐛BUG] 运行SHAN时报错 #1486

ShelveyJ opened this issue Oct 12, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ShelveyJ
Copy link

ShelveyJ commented Oct 12, 2022

使用如下代码运行SHAN时

from recbole.quick_start import run_recbole

parameter_dict = {
   'train_neg_sample_args': None,
}
run_recbole(model='SHAN', dataset='ml-100k', config_dict=parameter_dict)

出现以下错误

Traceback (most recent call last):
  File "D:\academic\code\RecBole-master\test.py", line 6, in <module>
    run_recbole(model='SHAN', dataset='ml-100k', config_dict=parameter_dict)
  File "D:\academic\code\RecBole-master\recbole\quick_start\quick_start.py", line 81, in run_recbole
    flops = get_flops(model, dataset, config["device"], logger, transform)
  File "D:\academic\code\RecBole-master\recbole\utils\utils.py", line 267, in get_flops
    model = copy.deepcopy(model)
  File "E:\anaconda3\envs\recbole\lib\copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "E:\anaconda3\envs\recbole\lib\copy.py", line 270, in _reconstruct
    state = deepcopy(state, memo)
  File "E:\anaconda3\envs\recbole\lib\copy.py", line 146, in deepcopy
    y = copier(x, memo)
  File "E:\anaconda3\envs\recbole\lib\copy.py", line 230, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "E:\anaconda3\envs\recbole\lib\copy.py", line 153, in deepcopy
    y = copier(memo)
  File "E:\anaconda3\envs\recbole\lib\site-packages\torch\_tensor.py", line 85, in __deepcopy__
    raise RuntimeError("Only Tensors created explicitly by the user "
RuntimeError: Only Tensors created explicitly by the user (graph leaves) support the deepcopy protocol at the moment

实验环境:

  • 操作系统: windows
  • RecBole 版本 1.1.1
  • Python 版本 3.9
  • PyTorch 版本 1.10.1
  • cudatoolkit 版本 10.2
@ShelveyJ ShelveyJ added the bug Something isn't working label Oct 12, 2022
@zhengbw0324 zhengbw0324 self-assigned this Oct 12, 2022
@zhengbw0324
Copy link
Collaborator

@ShelveyJ 您好!
感谢您的提醒,我们已在#1488修复了这个Bug,您可以在 GitHub 下载最新的代码进行使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants