diff --git a/experiments/attack_defense_test.py b/experiments/attack_defense_test.py index eba495a..ea9ce47 100644 --- a/experiments/attack_defense_test.py +++ b/experiments/attack_defense_test.py @@ -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, diff --git a/metainfo/poison_attack_parameters.json b/metainfo/poison_attack_parameters.json index ea5eb61..4f5da26 100644 --- a/metainfo/poison_attack_parameters.json +++ b/metainfo/poison_attack_parameters.json @@ -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"] } diff --git a/src/attacks/poison_attacks_collection/metattack/utils.py b/src/attacks/poison_attacks_collection/metattack/utils.py index a4bf404..201f301 100644 --- a/src/attacks/poison_attacks_collection/metattack/utils.py +++ b/src/attacks/poison_attacks_collection/metattack/utils.py @@ -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