Skip to content

Commit

Permalink
Cosmetic changes - see review
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeratt committed Sep 5, 2024
1 parent 8675747 commit 2542aab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion experiments/attack_defense_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_meta():

try:
raise FileNotFoundError()
gnn_model_manager.load_model_executor()
# gnn_model_manager.load_model_executor()
except FileNotFoundError:
gnn_model_manager.epochs = gnn_model_manager.modification.epochs = 0
train_test_split_path = gnn_model_manager.train_model(gen_dataset=dataset, steps=steps_epochs,
Expand Down
8 changes: 4 additions & 4 deletions metainfo/poison_attack_parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"n_edges_percent": ["n_edges_percent", "float", 0.1, {"min": 0.0001, "step": 0.01}, "?"]
},
"MetaAttackFull":{
"lambda_": ["Lambda", "float", 0.5, {}, "lambda coef - paper"],
"train_iters": ["Train iters (surrogate)", "int", 200, {}, "Trainig iterations for surrogate model"],
"lambda_": ["Lambda", "float", 0.5, {"min": 0, "max": 1, "step": 0.05}, "lambda coef - paper"],
"train_iters": ["Train iters (surrogate)", "int", 200, {"min": 0, "step": 1}, "Trainig iterations for surrogate model"],
"attack_structure": ["Attack structure", "bool", true, {}, "whether change graph structure with attack or not"],
"attack_features": ["Attack features", "bool", false, {}, "whether change node features with attack or not"]
},
"MetaAttackApprox":{
"lambda_": ["Lambda", "float", 0.5, {}, "lambda coef - paper"],
"train_iters": ["Train iters (surrogate)", "int", 200, {}, "Trainig iterations for surrogate model"],
"lambda_": ["Lambda", "float", 0.5, {"min": 0, "max": 1, "step": 0.05}, "lambda coef - paper"],
"train_iters": ["Train iters (surrogate)", "int", 200, {"min": 0, "step": 1}, "Trainig iterations for surrogate model"],
"attack_structure": ["Attack structure", "bool", true, {}, "whether change graph structure with attack or not"],
"attack_features": ["Attack features", "bool", false, {}, "whether change node features with attack or not"]
}
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/poison_attacks_collection/metattack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def to_tensor(adj, features, labels=None, device='cpu'):
Parameters
----------
adj : scipy.sparse.csr_matrix
adj : torch.Tensor
the adjacency matrix.
features : scipy.sparse.csr_matrix
node features
Expand Down

0 comments on commit 2542aab

Please sign in to comment.