Closed yyinhu closed 1 year ago
Could you report the version of "community"?
Could you report the version of "community"?
Could you report the version of "community"?
I installed 'community' through pip in Pycharm, with version 'community=1.0.0a1'. I cannot find the version of 'community' you requested in readme
"(venv) D:\data\Article\HC-GNN>pip install community==0.13 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Could not find a version that satisfies the requirement community==0.13 (from versions: 1.0.0a1, 1.0.0a2, 1.0.0b1) ERROR: No matching distribution found for community==0.13 "
Could you report the version of "community"?
May I ask if you require “Python louvain==0.13”?
When executing the link prediction task, a parameter 'ratio_sample_pos_link' is missing。
The execution code provided in the original text is as follows: “python main.py --task LP --dataset grid --mode basemodel --model HCGNN --layer_num 3 --epoch_num 2001 --lr 0.0001 --relu True --dropout True --drop_ratio 0.5 --same_level_gnn GCN --down2up_gnn MEAN --up2down_gnn GAT --fshot False --SEED 123 --gpu True”
The error is as follows: “(venv) D:\data\Article\HC-GNN>python main.py --task LP --dataset grid --mode basemodel --model HCGNN --layer_num 3 --epoch_num 2001 --lr 0.0001 --relu True --dropout True --drop_ratio 0.5 --same_level_gnn GCN --down2up_gnn MEAN --up 2down_gnn GAT --fshot False --SEED 123 --gpu True Namespace(SEED=123, comment='0', community_detection_method='Louvain', dataset='grid', device=device(type='cpu'), down2up_gnn='MEAN', drop_ratio=0.5, dropout=True, epoch_log=10, epoch_num=2001, feature_pre=True, fshot=True, gpu=True , layer_num=3, lr=0.0001, mode='basemodel', model='HCGNN', ratio_sample_pos=20, relu=True, same_level_gnn='GCN', task='LP', threshold=1, up2down_gnn='GAT', use_features=True)
Traceback (most recent call last):
File "main.py", line 70, in
When executing the link prediction task, a parameter 'ratio_sample_pos_link' is missing。
The execution code provided in the original text is as follows: “python main.py --task LP --dataset grid --mode basemodel --model HCGNN --layer_num 3 --epoch_num 2001 --lr 0.0001 --relu True --dropout True --drop_ratio 0.5 --same_level_gnn GCN --down2up_gnn MEAN --up2down_gnn GAT --fshot False --SEED 123 --gpu True”
The error is as follows: “(venv) D:\data\Article\HC-GNN>python main.py --task LP --dataset grid --mode basemodel --model HCGNN --layer_num 3 --epoch_num 2001 --lr 0.0001 --relu True --dropout True --drop_ratio 0.5 --same_level_gnn GCN --down2up_gnn MEAN --up 2down_gnn GAT --fshot False --SEED 123 --gpu True Namespace(SEED=123, comment='0', community_detection_method='Louvain', dataset='grid', device=device(type='cpu'), down2up_gnn='MEAN', drop_ratio=0.5, dropout=True, epoch_log=10, epoch_num=2001, feature_pre=True, fshot=True, gpu=True , layer_num=3, lr=0.0001, mode='basemodel', model='HCGNN', ratio_sample_pos=20, relu=True, same_level_gnn='GCN', task='LP', threshold=1, up2down_gnn='GAT', use_features=True)
Traceback (most recent call last): File "main.py", line 70, in ratio_sample=args.ratio_sample_pos_link AttributeError: 'Namespace' object has no attribute 'ratio_sample_pos_link' ”
Thanks for pointing out it. I have updated args.
Could you report the version of "community"?
May I ask if you require “Python louvain==0.13”?
I tested my code with python-louvain version 0.13.
Besides, I find "generate_dendrogram" should exist in their latest version, since they tested it here: https://github.com/taynaud/python-louvain/blob/638804ae636dc65306900ef6518ca0a1c9202566/test_community.py#L291.
When executing the link prediction task, a parameter 'ratio_sample_pos_link' is missing。 The execution code provided in the original text is as follows: “python main.py --task LP --dataset grid --mode basemodel --model HCGNN --layer_num 3 --epoch_num 2001 --lr 0.0001 --relu True --dropout True --drop_ratio 0.5 --same_level_gnn GCN --down2up_gnn MEAN --up2down_gnn GAT --fshot False --SEED 123 --gpu True” The error is as follows: “(venv) D:\data\Article\HC-GNN>python main.py --task LP --dataset grid --mode basemodel --model HCGNN --layer_num 3 --epoch_num 2001 --lr 0.0001 --relu True --dropout True --drop_ratio 0.5 --same_level_gnn GCN --down2up_gnn MEAN --up 2down_gnn GAT --fshot False --SEED 123 --gpu True Namespace(SEED=123, comment='0', community_detection_method='Louvain', dataset='grid', device=device(type='cpu'), down2up_gnn='MEAN', drop_ratio=0.5, dropout=True, epoch_log=10, epoch_num=2001, feature_pre=True, fshot=True, gpu=True , layer_num=3, lr=0.0001, mode='basemodel', model='HCGNN', ratio_sample_pos=20, relu=True, same_level_gnn='GCN', task='LP', threshold=1, up2down_gnn='GAT', use_features=True) Traceback (most recent call last): File "main.py", line 70, in ratio_sample=args.ratio_sample_pos_link AttributeError: 'Namespace' object has no attribute 'ratio_sample_pos_link' ”
Thanks for pointing out it. I have updated args.
Thank you!the problem has been resolved
Could you report the version of "community"?
May I ask if you require “Python louvain==0.13”?
I tested my code with python-louvain version 0.13.
Besides, I find "generate_dendrogram" should exist in their latest version, since they tested it here: https://github.com/taynaud/python-louvain/blob/638804ae636dc65306900ef6518ca0a1c9202566/test_community.py#L291.
Thank you! I get it.
Issues solved.
"Namespace(SEED=1234, comment='0', community_detection_method='Louvain', dataset='cora', device=device(type='cpu'), down2up_gnn='MEAN', drop_ratio=0.5, dropout=True, epoch_log=10, epoch_num=201, feature_pre=True, fshot=True, gpu=True , layer_num=2, lr=0.01, mode='basemodel', model='HCGNN', ratio_sample_pos=20, relu=True, same_level_gnn='GCN', task='NC', threshold=1, up2down_gnn='GCN', use_features=True)
is reading cora dataset... Name: Type: Graph Number of nodes: 2708 Number of edges: 5278 Average degree: 3.8981 is processing dataset... is generating hierarchical structure.... Is doing community detection.... start 0 subgraph... Traceback (most recent call last): File "main.py", line 96, in
ls_hierarchical_community, ls_up2down_edges, ls_down2up_edges = hierarchical_structure_generation(
File "D:\data\Article\HC-GNN\community_detection.py", line 224, in hierarchical_structure_generation
ls_hierarchical_community = Louvain_community_detection(graphs=graphs)
File "D:\data\Article\HC-GNN\community_detection.py", line 18, in Louvain_community_detection
dendrogram_old = community.generate_dendrogram(G)
AttributeError: module 'community' has no attribute 'generate_dendrogram'"
May I ask if anyone has encountered this problem before?