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

About loading rec model #5

Open
haoge6660101 opened this issue Apr 18, 2024 · 2 comments
Open

About loading rec model #5

haoge6660101 opened this issue Apr 18, 2024 · 2 comments

Comments

@haoge6660101
Copy link

1713442094260 1713442600935 1713442675256

尊敬的中科大的作者,您好:
请问一下,我在进行第一步执行main()函数,"model = MInterface"的时候出了一点问题:问题主要是在model_interface.py文件中的方法load_rec_model 中的,"self.rec_model = torch.load(rec_model_path, map_location="cpu")"这一句话。我导入传统推荐模型失败了(ToT),报错信息是"AttributeError: module 'main' has no attribute 'SASRec'",但是我不知道是什么原因?应该怎么就解决?麻烦您帮我看一下,谢谢您!!

Dear author of USTC, Hello:
Excuse me, I had a problem with the first step of the main() function, "model = MInterface" : The main problem is the sentence "self.rec_model = torch.load(rec_model_path, map_location="cpu")" in the model_interface.py file for method load_rec_model. I failed to import the traditional recommendation model (ToT) with the error "AttributeError: module 'main' has no attribute 'SASRec'", but I don't know why. How should it be resolved? Please help me take a look, thank you!

@ljy0ustc
Copy link
Owner

感谢您对我们工作的关注!
main.py文件里开头import了SASRec等传统推荐模型,您可以检查一下python运行环境中包导入的路径配置。

@walk-in-dead
Copy link

您好,我也遇到了类似的问题,始终没有找到问题出现在哪儿,麻烦问一下您最后解决了这个问题吗?是怎么解决的呀

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

3 participants