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

pretrain on GEOM #10

Open
EricGu1001 opened this issue Jul 13, 2024 · 3 comments
Open

pretrain on GEOM #10

EricGu1001 opened this issue Jul 13, 2024 · 3 comments

Comments

@EricGu1001
Copy link

QQ图片20240714011506
(calm) (base) penghuan@ubuntu:~/code/SimSGT/regression$ sh script/pretrain_GEOM.sh
add args
Namespace(batch_size=2048, block_mask=False, block_size=2, brics_pooling='mean', complete_feature=True, custom_trans=True, d_model=128, dataset='GEOM/GEOM_3D_nmol100_nconf5_nupper1000_morefeat', decay=0, decoder_input_norm=True, decoder_jk='last', device=0, dim_feedforward=512, dim_pe=28, disable_remask=False, drop_mask_tokens=True, eigvec_norm='L2', epochs=100, eps=0.5, gnn_JK='last', gnn_activation='relu', gnn_decoder_layer=3, gnn_dropout=0, gnn_emb_dim=300, gnn_encoder_layer=5, gnn_norm='batchnorm', gnn_token_layer=1, gnn_type='gin_v3', input_model_file=None, kernel_times=[], kernel_times_func='none', laplacian_norm='none', layers=3, log_steps=100, loss='mse', loss_all_nodes=False, lr=0.001, mask_rate=0.35, max_freqs=20, model_file=None, model_save_prefix='model', moving_average_decay=0.99, name='pretrain_GEOM', nhead=4, no_edge_tokenizer=False, nonpara_tokenizer=True, num_workers=4, optim_file=None, pe_type='none', phi_hidden_dim=32, phi_out_dim=32, post_layers=2, pretrained_tokenizer=False, raw_norm_type='none', resume_epoch=0, save_epochs=20, seed=42, split=None, subgraph_mask=False, tk_JK='last', tk_activation='relu', tk_decoder_JK='last', tk_decoder_layers=1, tk_decoder_remask=False, tk_dropout=0, tk_full_x=False, tk_gnn_type='gin', tk_layers=1, tk_no_edge=False, tk_no_edge_decoder=False, tk_pretrain_scheme='graphmae', tk_trans_layers=0, tlr_scale=1.0, tokenizer_path=None, tokenizer_type='gin', trans_decoder_layer=1, trans_encoder_layer=4, transformer_activation='relu', transformer_dropout=0, transformer_norm_input=True, use_trans_decoder=True, zero_mask=False)
[2024-07-14 01:10:05] Namespace(batch_size=2048, block_mask=False, block_size=2, brics_pooling='mean', complete_feature=True, custom_trans=True, d_model=128, dataset='GEOM/GEOM_3D_nmol100_nconf5_nupper1000_morefeat', decay=0, decoder_input_norm=True, decoder_jk='last', device=device(type='cuda', index=0), dim_feedforward=512, dim_pe=28, disable_remask=False, drop_mask_tokens=True, eigvec_norm='L2', epochs=100, eps=0.5, gnn_JK='last', gnn_activation='relu', gnn_decoder_layer=3, gnn_dropout=0, gnn_emb_dim=300, gnn_encoder_layer=5, gnn_norm='batchnorm', gnn_token_layer=1, gnn_type='gin_v3', input_model_file=None, kernel_times=[], kernel_times_func='none', laplacian_norm='none', layers=3, log_file='./results/pretrain_GEOM/log.txt', log_steps=100, loss='mse', loss_all_nodes=False, lr=0.001, mask_rate=0.35, max_freqs=20, model_file=None, model_save_prefix='model', moving_average_decay=0.99, name='pretrain_GEOM', nhead=4, no_edge_tokenizer=False, nonpara_tokenizer=True, num_workers=4, optim_file=None, pe_type='none', phi_hidden_dim=32, phi_out_dim=32, post_layers=2, pretrained_tokenizer=False, raw_norm_type='none', resume_epoch=0, save_epochs=20, seed=42, split=None, subgraph_mask=False, tk_JK='last', tk_activation='relu', tk_decoder_JK='last', tk_decoder_layers=1, tk_decoder_remask=False, tk_dropout=0, tk_full_x=False, tk_gnn_type='gin', tk_layers=1, tk_no_edge=False, tk_no_edge_decoder=False, tk_pretrain_scheme='graphmae', tk_trans_layers=0, tlr_scale=1.0, tokenizer_path=None, tokenizer_type='gin', trans_decoder_layer=1, trans_encoder_layer=4, transformer_activation='relu', transformer_dropout=0, transformer_norm_input=True, use_trans_decoder=True, zero_mask=False)
Traceback (most recent call last):
File "pretraining.py", line 168, in
main()
File "pretraining.py", line 124, in main
dataset = MoleculeDataset("/home/penghuan/code/SimSGT/regression/dataset/" + dataset_name, dataset=dataset_name)
File "/home/penghuan/code/SimSGT/regression/loader.py", line 385, in init
super(MoleculeDataset, self).init(root, transform, pre_transform,
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch_geometric/data/in_memory_dataset.py", line 56, in init
super().init(root, transform, pre_transform, pre_filter)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch_geometric/data/dataset.py", line 84, in init
self._download()
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch_geometric/data/dataset.py", line 145, in _download
self.download()
File "/home/penghuan/code/SimSGT/regression/loader.py", line 415, in download
raise NotImplementedError('Must indicate valid location of raw data. '
NotImplementedError: Must indicate valid location of raw data. No download allowed
I think I have the correct dataset but there is still error!

@EricGu1001
Copy link
Author

我注释掉了loader.py中的

def download(self):

#     raise NotImplementedError('Must indicate valid location of raw data. '
#                               'No download allowed')

再次运行pretrain_GEOM
Traceback (most recent call last):
File "pretraining.py", line 168, in
main()
File "pretraining.py", line 157, in main
train_mae(args, model, loader, optimizer, epoch)
File "pretraining.py", line 26, in train_mae
loss = model(batch)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/code/SimSGT/regression/model.py", line 862, in forward
h = self.encoder(self.gnn_act(h), edge_index, edge_attr, data.batch, data.mask_tokens, pe_tokens)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/code/SimSGT/regression/model.py", line 1559, in forward
h = self.gnns[layer](h_list[layer], edge_index, edge_attr)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/code/SimSGT/regression/model.py", line 291, in forward
return self.propagate(edge_index, x=x, edge_attr=edge_embeddings)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 351, in propagate
out = self.update(out, **update_kwargs)
File "/home/penghuan/code/SimSGT/regression/model.py", line 297, in update
return self.mlp(aggr_out)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/activation.py", line 98, in forward
return F.relu(input, inplace=self.inplace)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/functional.py", line 1442, in relu
result = torch.relu(input)
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

@EricGu1001
Copy link
Author

Traceback (most recent call last):
File "pretraining.py", line 168, in
main()
File "pretraining.py", line 157, in main
train_mae(args, model, loader, optimizer, epoch)
File "pretraining.py", line 26, in train_mae
loss = model(batch)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/SimSGT/regression/model.py", line 857, in forward
h = self.encoder(self.gnn_act(h), edge_index, edge_attr, data.batch, data.mask_tokens, pe_tokens)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/SimSGT/regression/model.py", line 1554, in forward
h = self.gnns[layer](h_list[layer], edge_index, edge_attr)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/SimSGT/regression/model.py", line 291, in forward
return self.propagate(edge_index, x=x, edge_attr=edge_embeddings)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 317, in propagate
out = self.message(**msg_kwargs)
File "/home/penghuan/SimSGT/regression/model.py", line 294, in message
return self.activation(x_j + edge_attr)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/penghuan/miniconda3/envs/calm/lib/python3.8/site-packages/torch/nn/modules/activation.py", line 1111, in forward
return F.prelu(input, self.weight)
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

@EricGu1001
Copy link
Author

每一次的报错内容还不一定一样 希望能解答一下 是数据格式的问题或者其他方面的问题吗?

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

1 participant