jinyangwu / KGETCDA

Official implementation of "KGETCDA: an efficient representation learning framework based on knowledge graph encoder from transformer for predicting circRNA-disease associations" (Briefings in Bioinformatics 2023)
MIT License
6 stars 3 forks source link

找不到pairs_train #2

Open LemonTreeDog opened 1 year ago

LemonTreeDog commented 1 year ago

你好,我是刚刚进入这个领域的小白,你的论文和代码对我受益匪浅,但是当我尝试运行你的代码主函数的时候,他一直跳出 ''' 2023-10-03,15:58:10 [INFO] Namespace(seed=2022, gpu=0, dataset='Dataset1', fold=1, data_dir='./datasets/', kg_type='KGET', aggregation_type='gcn', ap_batch_size=80, kg_batch_size=64, entity_dim=2048, relation_dim=2048, d_k=32, d_v=50, d_inner=512, kernels=64, conv_dim_list='[512, 256, 128, 64]', decoder='twomult', n_layers=1, num_heads=16, dropout_convkb=0.2, mess_dropout='[0.1, 0.1, 0.1, 0.1]', kg_dropout='[0.2, 0.3, 0.2, 0.3]', kg_l2loss_lambda=1e-05, ap_l2loss_lambda=1e-05, lr=0.0001, n_epoch=100, ap_print_every=5, kg_print_every=10, mlp_lr=0.0009, mlp_epochs=65, mlp_dropout=0.04, mlp_wd=1e-07, sample_k=10, sample_ratio=8, tower=2, sim_type='fused', save_dir='./trained_model/KGETCDA/Dataset1/embed-dim2048_relation-dim2048_gcn_KGET_512-256-128-64_lr0.0001_heads16_layers1_decodertwomult/', log_path='./trained_model/KGETCDA/Dataset1/embed-dim2048_relation-dim2048_gcn_KGET_512-256-128-64_lr0.0001_heads16_layers1_decodertwomult/fold1/log/', model_path='./trained_model/KGETCDA/Dataset1/embed-dim2048_relation-dim2048_gcn_KGET_512-256-128-64_lr0.0001_heads16_layers1_decodertwomult/fold1/saved_model/', embedding_path='./trained_model/KGETCDA/Dataset1/embed-dim2048_relation-dim2048_gcn_KGET_512-256-128-64_lr0.0001_heads16_layers1_decodertwomult/fold1/embedding/', result_path='./trained_model/KGETCDA/Dataset1/embed-dim2048_relation-dim2048_gcn_KGET_512-256-128-64_lr0.0001_heads16_layers1_decodertwomult/fold1/results/') Traceback (most recent call last): File "D:\B_thesis\RNA疾病关联预测\代码\KGETCDA-main\main.py", line 148, in train(args) File "D:\B_thesis\RNA疾病关联预测\代码\KGETCDA-main\main.py", line 44, in train dataloader = DataLoaderKGETCDA(args, logger) File "D:\B_thesis\RNA疾病关联预测\代码\KGETCDA-main\data_loader\loader_KGETCDA.py", line 190, in init super(DataLoaderKGETCDA, self).init(args) File "D:\B_thesis\RNA疾病关联预测\代码\KGETCDA-main\data_loader\loader_KGETCDA.py", line 31, in init self.ap_train_data, self.train_circ_dict = self.load_ap(self.train_file) File "D:\B_thesis\RNA疾病关联预测\代码\KGETCDA-main\data_loader\loader_KGETCDA.py", line 44, in load_ap lines = open(filename, 'r').readlines() FileNotFoundError: [Errno 2] No such file or directory: './datasets/Dataset1/fold1/pairs_train.txt' All logs will be saved to ./trained_model/KGETCDA/Dataset1/embed-dim2048_relation-dim2048_gcn_KGET_512-256-128-64_lr0.0001_heads16_layers1_decodertwomult/fold1/log/log1.log

进程已结束,退出代码1 '''

这个错误,说找不到pairs_train文件,请问怎么办,感谢您!!!

jinyangwu commented 1 year ago

Hello, thanks for your attention!

As for the pairs_train.txt, we have uploaded the preprocess.py. You can first use this file to generate 'pairs_train.txt' and 'pairs_test.txt', and then rerun the main program of the whole KGETCDA.

Hope this can help you.

myseverus commented 2 months ago

Traceback (most recent call last): File "C:/Users/20825/Desktop/bioinformations/KGETCDA-main/datasets/preprocess.py", line 220, in main(fold, raw_path, save_path) File "C:/Users/20825/Desktop/bioinformations/KGETCDA-main/datasets/preprocess.py", line 21, in main triples, relations, ents2ids, rels2ids, circ_disease_pair = generate_basic_information(raw_path, save_path) File "C:/Users/20825/Desktop/bioinformations/KGETCDA-main/datasets/preprocess.py", line 38, in generate_basic_information with open(raw_path + 'circrna-mirna.txt', 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: '../Dataset1/circrna-mirna.txt' hi! but i can't run the code this preprocess.py,it has't the circrna-mirna.txt