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] 试图运行MCCLK模型时出现RuntimeError错误 #2138

Open
staphylinid opened this issue Jan 24, 2025 · 0 comments
Open

[🐛BUG] 试图运行MCCLK模型时出现RuntimeError错误 #2138

staphylinid opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@staphylinid
Copy link

描述这个 bug
在使用默认的MCCLK模型进行

如何复现
复现这个 bug 的步骤:
使用默认的.yaml文件,使用默认的ml-100k数据集

屏幕截图
Traceback (most recent call last):
File "C:\Users\Lenovo\Desktop\RecBole-master\main.py", line 2, in
run_recbole(model='MCCLK', dataset='ml-100k', )#config_file_list=['NCL.yaml']
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\quick_start\quick_start.py", line 141, in run_recbole
flops = get_flops(model, dataset, config["device"], logger, transform)
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\utils\utils.py", line 347, in get_flops
wrapper(*inputs)
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\utils\utils.py", line 288, in forward
return self.model.predict(interaction)
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\model\knowledge_aware_recommender\mcclk.py", line 638, in predict
) = self.forward()
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\model\knowledge_aware_recommender\mcclk.py", line 458, in forward
entity_gcn_emb, user_gcn_emb, item_adj = self.gcn(user_emb, entity_emb)
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\model\knowledge_aware_recommender\mcclk.py", line 187, in forward
entity_emb, user_emb = self.convs[i](
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Lenovo\Desktop\RecBole-master\recbole\model\knowledge_aware_recommender\mcclk.py", line 61, in forward
neigh_relation_emb_weight = scatter_softmax(
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch_scatter\composite\softmax.py", line 18, in scatter_softmax
max_value_per_index = scatter_max(
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch_scatter\scatter.py", line 84, in scatter_max
return torch.ops.torch_scatter.scatter_max(src, index, dim, out, dim_size)
File "C:\Users\Lenovo.conda\envs\pytorch\lib\site-packages\torch_ops.py", line 1116, in call
return self._op(*args, **(kwargs or {}))
RuntimeError: CUDA error: the provided PTX was compiled with an unsupported toolchain.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

实验环境(请补全下列信息):

  • 操作系统: [Windows 10]
  • RecBole 版本 [1.2.0]
  • Python 版本 [3.10]
  • PyTorch 版本 [2.5.1]
  • cudatoolkit 版本 [如 11.8.0]

我听说是CUDA版本过高的问题吗?刚开始我遇到了没有安装torch-scatter库的问题,使用pip安装后的报错是版本不符,最后在安装符合我pytorch与CUDA版本(2.1.2+pt25cu121) 的torch-scatter后,我的信息报错如最后几句所示

@staphylinid staphylinid added the bug Something isn't working label Jan 24, 2025
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

1 participant