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

An error when finetuning on graph classification dataset #13

Closed
Kqiii opened this issue Dec 13, 2020 · 3 comments
Closed

An error when finetuning on graph classification dataset #13

Kqiii opened this issue Dec 13, 2020 · 3 comments

Comments

@Kqiii
Copy link

Kqiii commented Dec 13, 2020

Hi,

I encountered an error when finetuning on imdb-binary dataset.

The running command is

bash scripts/finetune.sh saved/Pretrain_moco_True_dgl_gin_layer_5_lr_0.005_decay_1e-05_bsz_32_hid_64_samples_2000_nce_t_0.07_nce_k_163841_rw_hops_256_restart_prob_0.8_aug_1st_ft_False_deg_16_pos_32_momentum_0.999/ 0 imdb-binary

The error message is
AttributeError: 'GraphClassificationDatasetLabeled' object has no attribute 'dataset'

Please see the screenshot:
Screen Shot 2020-12-13 at 8 53 17 PM

Thank you!

@Kqiii
Copy link
Author

Kqiii commented Dec 13, 2020

I am wondering whether this is because the super().init() of the GraphClassificationDataset is missed (see gcc/datasets/graph_dataset.py line 312).

@qibinc
Copy link
Collaborator

qibinc commented Dec 13, 2020

Hi @Kqiii ,

Thanks for pointing out. This is a bug created during us refactoring the code. Please change the following to fix it:

Change

self.graphs = data_util.create_graph_classification_dataset(dataset).graph_lists

to

self.dataset = data_util.create_graph_classification_dataset(dataset)
self.graphs = self.dataset.graph_lists

This should fix the problem. We're really sorry for the trouble. Please kindly follow up the results if possible.

@Kqiii
Copy link
Author

Kqiii commented Dec 13, 2020

Hi @Kqiii ,

Thanks for pointing out. This is a bug created during us refactoring the code. Please change the following to fix it:

Change

self.graphs = data_util.create_graph_classification_dataset(dataset).graph_lists

to

self.dataset = data_util.create_graph_classification_dataset(dataset)
self.graphs = self.dataset.graph_lists

This should fix the problem. We're really sorry for the trouble. Please kindly follow up the results if possible.

Hi,

Thank you for your prompt reply. This works well for me. Btw, your GCC work is really informative and insightful. Actually, I have read many papers on self-supervised graph representation learning recently, and I think GCC is definitely among the best.

Thanks!

@Kqiii Kqiii closed this as completed Dec 13, 2020
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

No branches or pull requests

2 participants