zyang1580 / PDA

This is an implementation for our SIGIR 2021 paper "Causal Intervention for Leveraging Popularity Bias inRecommendation" based on tensorflow..
96 stars 30 forks source link

ModuleNotFoundError: No module named 'util.cython.random_choice' #1

Closed WEIFZH closed 3 years ago

WEIFZH commented 3 years ago

Thanks for your work, while running the command,

python -u MF/simple_reproduce.py --dataset douban --epoch 2000 --save_flag 0 --log_interval 5 --start 0 --end 10 --step 1 --batch_size 2048 --lr 1e-2 --train s_condition --test s_condtion --saveID xxx --cuda 0 --regs 1e-2 --valid_set valid --pop_exp 0.22 --save_dir /home/PDA/save_model/ --Ks [20,50]

error occurs

Traceback (most recent call last): File "MF/simple_reproduce.py", line 39, in from evaluator import ProxyEvaluator File "/home/weifz/codes/PDA/evaluator/init.py", line 1, in from .proxy_evaluator import ProxyEvaluator File "/home/weifz/codes/PDA/evaluator/proxy_evaluator.py", line 4, in from util import typeassert File "/home/weifz/codes/PDA/util/init.py", line 14, in from .cython.random_choice import batch_randint_choice ModuleNotFoundError: No module named 'util.cython.random_choice'

could you tell me how to fix it, thanks a lot.

zyang1580 commented 3 years ago

Has the package Cython been installed?

WEIFZH @.***> 于2021年6月24日周四 上午11:51写道:

Thanks for your work, while running the command,

python -u MF/simple_reproduce.py --dataset douban --epoch 2000 --save_flag 0 --log_interval 5 --start 0 --end 10 --step 1 --batch_size 2048 --lr 1e-2 --train s_condition --test s_condtion --saveID xxx --cuda 0 --regs 1e-2 --valid_set valid --pop_exp 0.22 --save_dir /home/PDA/save_model/ --Ks [20,50]

error occurs

Traceback (most recent call last): File "MF/simple_reproduce.py", line 39, in from evaluator import ProxyEvaluator File "/home/weifz/codes/PDA/evaluator/init.py", line 1, in from .proxy_evaluator import ProxyEvaluator File "/home/weifz/codes/PDA/evaluator/proxy_evaluator.py", line 4, in from util import typeassert File "/home/weifz/codes/PDA/util/init.py", line 14, in from .cython.random_choice import batch_randint_choice ModuleNotFoundError: No module named 'util.cython.random_choice'

could you tell me how to fix it, thanks a lot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zyang1580/PDA/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO3KU2PFLMYT6B4VRGDQSLTUKTTBANCNFSM47HBJCAA .

WEIFZH commented 3 years ago

No, but I noticed that there exists cython package in this repo, './util/cython' and the error occurs in './util/init.py'

zyang1580 commented 3 years ago

You need to install it. In init.py, it only tries to import something from the package.

WEIFZH @.***> 于2021年6月24日周四 下午8:54写道:

No, but I noticed that there exists cython package in this repo, './util/cython' and the error occurs in './util/init.py'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zyang1580/PDA/issues/1#issuecomment-867612736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO3KU57WVD2MBJBXJ7LG5DTUMTGZANCNFSM47HBJCAA .

WEIFZH commented 3 years ago

Deleting this line of code works : )

liangruiqian commented 1 month ago

I also have a related problem.How did you solve this problem?