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

ModuleNotFoundError: No module named 'graphgpt' #70

Open
zhuochunli opened this issue May 15, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'graphgpt' #70

zhuochunli opened this issue May 15, 2024 · 1 comment

Comments

@zhuochunli
Copy link

When run the scripts/eval_script/graphgpt_eval.sh for evaluation, an error will occur:
Traceback (most recent call last):
File "./graphgpt/eval/run_graphgpt.py", line 7, in
from graphgpt.conversation import conv_templates, SeparatorStyle
ModuleNotFoundError: No module named 'graphgpt'

Why: this is caused by the file structure and importing problems. The folder "graphgpt" is the parent parent path of run_graphgpt.py, so we should import graphgpt from its parent parent path (../../). Hope author can solve this soon!

Solution: adding this in front of the import graphgpt:

import os
import sys
CURRENT_DIR = os.path.split(os.path.abspath(__file__))[0]  # current path
config_path = CURRENT_DIR.rsplit('/', 2)[0]  # the upper upper path
sys.path.append(config_path)
@quantum-neko
Copy link

You can export the path of GraphGPT into .bashrc

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