Graph-Unlearning icon indicating copy to clipboard operation
Graph-Unlearning copied to clipboard

Some questions and requests for complete code

Open Alchemistqqqq opened this issue 1 year ago • 1 comments

Hello, I am very interested in your work, but I met some problems when I reproduced it. First, I want to replicate four experiments. For the partitioning experiment, the batch file referenced was deleted by you, and I replaced it with net file to run the experiment. However, in the node_edge_unlearning experiment, the first prompt was given INFO:2024-06-04 09:54:50,523: -node_classifier - : generate train loader finish INFO:2024-06-04 09:54:50,524: -node_classifier - : epoch 0 INFO:2024-06-04 09:54:50,525: -node_classifier - : batch size: 313 Traceback (most recent call last): File "main.py", line 52, in main(args, args['exp']) File "main.py", line 42, in main ExpNodeEdgeUnlearning(args) File "/home/h3c/Graph-Unlearning/exp/exp_node_edge_unlearning.py", line 30, in init self.run_exp() File "/home/h3c/Graph-Unlearning/exp/exp_node_edge_unlearning.py", line 38, in run_exp self.train_target_models(run) File "/home/h3c/Graph-Unlearning/exp/exp_node_edge_unlearning.py", line 87, in train_target_models self.time[shard] = self._train_model(run, shard) File "/home/h3c/Graph-Unlearning/exp/exp_node_edge_unlearning.py", line 159, in _train_model self.target_model.train_model() File "/home/h3c/Graph-Unlearning/lib_gnn_model/node_classifier.py", line 82, in train_model out = self.model(self.data.x[n_id], adjs) The File "/ home/h3c/anaconda3 / envs/graph/lib/python3.6 / site - packages/torch/nn/modules/module. Py", line 1051, in _call_impl return forward_call(*input, **kwargs) TypeError: forward() takes 2 positional arguments but 3 were given So I changed the code to: if self.target_model == 'GCN': out = self.model(self.data.x[n_id], adjs, self.edge_weight) else: out = self.model(self.data)

loss = F.nll_loss(out, self.data.y) loss.backward() optimizer.step()

train_acc, test_acc = self.evaluate_model() self.logger.info(f'Train: {train_acc:.4f}, Test: {test_acc:.4f}') It is then suggested that GAT-NET lacks inference method. Since I am a beginner, I hope to get some help by asking questions. Can you provide the complete code or provide some help?

Alchemistqqqq avatar Jun 04 '24 03:06 Alchemistqqqq

image

Alchemistqqqq avatar Jun 04 '24 03:06 Alchemistqqqq

Hi, thank you for your interest in our work! Based on the error message, it seems the issue arises from incompatible package versions. This is likely the cause of the error. As I currently don’t have the resources to update the code to ensure compatibility with newer package versions, I recommend using Conda or Docker to recreate the working environment specified in the Readme.txt file. This should help resolve the issue.

MinChen00 avatar Nov 16 '24 14:11 MinChen00