-
Notifications
You must be signed in to change notification settings - Fork 67
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
No module named 'graphgpt' #56
Comments
您好,请问您可以提供具体的报错信息嘛。 |
@tjb-tech 您好,我也遇到同样的问题,以下是我的运行指令:
在之前的issue中有提到遇到ModuleNotFoundError: No module named 'graphgpt'要将脚本执行路径切换到Graphgpt,可是我检查后路径没有问题,我已经在Graphgpt的文件路径下了,请问这种情况您有遇见过吗?应该如何处理? |
我的报错信息和ta的一样 |
同样遇到该问题 |
您好,请问您有试过将graphgpt_stage1.sh脚本放到GraphGPT的目录下再运行嘛?同时,能否放出您使用的脚本的具体内容,可以帮助我们帮您debug。 |
您好,您的shell脚本中的以下内容填写有错,shell脚本变量的“=”之间不能有空格,可能会导致编译错误: model_path= ./vicuna-7b-v1.5-16k
instruct_ds= ./data/graph_matching.json
graph_data_path=./graph_data/all_graph_data.pt
pretra_gnn= clip_gt_arxiv 应该改为: model_path=./vicuna-7b-v1.5-16k
instruct_ds=./data/graph_matching.json
graph_data_path=./graph_data/all_graph_data.pt
pretra_gnn=clip_gt_arxiv 另外,请问您有试过将graphgpt_stage1.sh脚本放到GraphGPT的目录下再运行嘛? |
我刚才也尝试了重新在GraphGPT下运行,结果同样,下面是我的运行指令:
我的报错信息:
|
@tjb-tech
输出:
|
您好,这个问题我之前都没遇到过,您可以试试把python换成python3再试试嘛,或者 # to fill in the following path to run the first stage of our GraphGPT!
model_path=/root/nas/models_hf/vicuna-7b-v1.5
instruct_ds=/root/nas/GraphGPT/train_instruct_graphmatch.json
graph_data_path=/root/nas/GraphGPT/graphgpt/graph_data/graph_data_all.pt
pretra_gnn=/root/nas/GraphGPT/graphgpt/clip_gt_arxiv
output_model=/root/nas/GraphGPT/checkpoints/stage_1
wandb offline
python3 -m torch.distributed.run --nnodes=1 --nproc_per_node=4 --master_port=20001 \
graphgpt/train/train_mem.py \
--model_name_or_path ${model_path} \
--version v1 \
--data_path ${instruct_ds} \
--graph_content ./arxiv_ti_ab.json \
--graph_data_path ${graph_data_path} \
--graph_tower ${pretra_gnn} \
--tune_graph_mlp_adapter True \
--graph_select_layer -2 \
--use_graph_start_end \
--bf16 True \
--output_dir ${output_model} \
--num_train_epochs 3 \
--per_device_train_batch_size 2 \
--per_device_eval_batch_size 2 \
--gradient_accumulation_steps 1 \
--evaluation_strategy "no" \
--save_strategy "steps" \
--save_steps 2400 \
--save_total_limit 1 \
--learning_rate 2e-3 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--tf32 True \
--model_max_length 2048 \
--gradient_checkpointing True \
--lazy_preprocess True \
--report_to wandb |
可以尝试一下上面的方法 |
@tjb-tech 您好,我刚才尝试了这个方法,报错似乎变得不一样了:
|
您有尝试过 |
好的,
|
您好,现在错误的原因还未清晰(我这边运行没有问题,但是有同学反映有问题)。作为暂时的解决方案,您可以在train_mem.py的最开头中加入以下代码来显性添加路径: import os
import sys
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(os.path.split(curPath)[0])[0]
print(curPath, rootPath)
sys.path.append(rootPath) 我们后续会看下到底是什么原因导致的这个问题 |
我通过修改环境变量的方式解决了no module这个问题: 我使用的是: |
感谢您的回答! |
解决了no module的报错后,又出现了以下的报错,请问该如何解决呢?
|
这个是在模型load的时候出了问题,请问您有根据机器修改 |
好的,我已经修改了,但又出现了新的error: |
可以参考issue #7 |
不好意思,我这里还有error,想问下是哪里出了问题呢?在vicuna的config中写的pretrain_model_path地址下是有config.json的,但依然报错
|
我已经在Graphgpt的文件夹里面,使用sh ./GraphGPT/scripts/tune_script/graphgpt_stage1.sh来运行文件,但依旧有这个报错。请问我该如何修正呢?
The text was updated successfully, but these errors were encountered: