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

Where is main.py? #2

Open
liushiliushi opened this issue Oct 22, 2023 · 10 comments
Open

Where is main.py? #2

liushiliushi opened this issue Oct 22, 2023 · 10 comments

Comments

@liushiliushi
Copy link

I couldn't find main.py as mentioned in README

@yangzhao1230
Copy link
Owner

Thank you for your interest in our work. Indeed, there have been significant changes in both the overall model and the codebase since the initial release. As you can see from the commit history, I have made corrections to the code. However, I have not had the opportunity to update the README file yet.

The main.py you mentioned has now been replaced with main_shuffle_wo_smiles.py. You can refer to this new code in the meantime. I apologize for any inconvenience this may have caused.

I am currently quite busy, but I plan to update the README once things settle down.

@liushiliushi
Copy link
Author

I'm very interested in your work. Thanks for your prompt assistance in resolving the issue!

@liushiliushi
Copy link
Author

By the way, could you please tell me how to extract pairs of (Graph, Text) data from KV-PLM into data/kv_data? Can I simply put the txt file under into data/kv_data? Thank you very much!

image

@yangzhao1230
Copy link
Owner

I am providing you with access to the well-formatted data through the following link: https://drive.google.com/file/d/1XTUwZYnyly5x0dZB7AprJw_hAQk7pHAr/view?usp=drive_link

@liushiliushi
Copy link
Author

Thanks for your help!

I encountered another issue while running main_shuffle_wo_smiles.py. When the code reaches line 64, specifically, "for batch in dataloader", I encountered the following error:

_pickle.PicklingError: Can't pickle <class 'torch_geometric.data.batch.Batch'>: it's not the same object as torch_geometric.data.batch.Batch.

Do you know the reason for this issue? I suspect it might be related to the version of torch_geometric. Could you please provide the version of torch_geometric that you are using?

@yangzhao1230
Copy link
Owner

@liushiliushi
Copy link
Author

Thank you for your kind help! I managed to resolve the issue by upgrading torch_geometric from version 2.0.0 to 2.1.0. Just to note, if the torch_geometric version is 2.4.0, it will also result in an error. So the version of torch_geometric is indeed crucial. I recommend that you consider mentioning the required torch_geometric version in the README when you are available.

I have another question. I encounterd this text in the terminal while running. Is this normal?

Some weights of the model checkpoint at bert_pretrained/ were not used when initializing BertModel: ['cls.predictions.decoder.weight', 'cls.predictions.bias', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.dense.weight']
- This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).

@yangzhao1230
Copy link
Owner

In just a warning, which doesn't matter. The original SciBERT further incorporates the CLS token into some downstream tasks, but we only use the features and do not require the weights for these downstream tasks.

@liushiliushi
Copy link
Author

Ok, thanks for your time and assistance. I'm truly grateful for your help.

@qiansirjun
Copy link

May I ask if there is only zero sample cross modal retrieval task in the code? If I want to input only one text and retrieve the corresponding image, how should I modify the code?

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

3 participants