Skip to content
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

Metattack #18

Merged
merged 6 commits into from
Sep 17, 2024
Merged

Metattack #18

merged 6 commits into from
Sep 17, 2024

Conversation

Jeratt
Copy link
Collaborator

@Jeratt Jeratt commented Aug 23, 2024

No description provided.

@mishabounty
Copy link
Collaborator

Запустил код атаки, — все отрабатывает, ок. Хочется иметь возможность управлять параметром attack_budget метода attack, потому что он напрямую влияет на длительность вычислений.

mishabounty
mishabounty previously approved these changes Sep 4, 2024
Comment on lines 8 to 9
"lambda_": ["Lambda", "float", 0.5, {}, "lambda coef - paper"],
"train_iters": ["Train iters (surrogate)", "int", 200, {}, "Trainig iterations for surrogate model"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Стоит добавить границы и шаг для параметров lambda_, train_iters, — в дальнейшем может понадобиться для фронт части

idx_unlabeled = gen_dataset.test_mask

self.sparse_features = sp.issparse(ori_features)
ori_adj, ori_features, labels = utils.to_tensor(ori_adj, ori_features, labels, device=self.device)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

функция to_tensor в описании параметров ожидает adj в формате scipy.sparse.csr_matrix, однако ori_adj = gen_dataset.dataset.data.edge_index — объект torch.Tensor. Далее в функции to_tensor ты работаешь с adj как с объектом torch.Tensor, что корректно. Поэтому всего лишь стоит поправить документацию для функции to_tensor: (adj: torch.Tensor). Аналогичное замечание в классе MetaAttackApprox (453 строка кода)


try:
raise FileNotFoundError()
gnn_model_manager.load_model_executor()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

строка кода gnn_model_manager.load_model_executor() не будет выполнена, т.к. выполнение блока try прерывается исключением FileNotFoundError => закомментить или убрать

mishabounty
mishabounty previously approved these changes Sep 5, 2024
@LukyanovKirillML LukyanovKirillML merged commit 766c35e into develop Sep 17, 2024
2 checks passed
@Jeratt Jeratt deleted the metattack branch September 18, 2024 08:12
@Jeratt Jeratt restored the metattack branch September 18, 2024 08:12
@Jeratt Jeratt deleted the metattack branch September 18, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants