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

RuntimeError: copy_if failed to synchronize: cudaErrorAssert: device-side assert triggered #61

Open
AndDoIt opened this issue Jan 3, 2022 · 4 comments

Comments

@AndDoIt
Copy link

AndDoIt commented Jan 3, 2022

During the training with my Chinese dataset, it always occurred the following error, could you please help me to solve it?
image

@markus-eberts
Copy link
Member

The affected code line extracts the classifier token's ([CLS]) embedding. The [CLS] token is added during dataset loading (see input_reader.py file). I'm not sure why the error occurs with your dataset. Maybe you already include the [CLS] token in your dataset JSON file? And are you sure no other character (or subword) is mapped to the same ID as [CLS] (in your vocabulary)?

@AndDoIt
Copy link
Author

AndDoIt commented Jan 4, 2022

Thanks for your reply very much!
Following your guide, I checked _parse_tokens function in input_reader.py with doc_encoding.count(101), and there is only 1 [CLS] token. Since I have 35 kinds of relations and 25 kinds of entities, the actual affected code line is self.size_embeddings = nn.Embedding(100, size_embedding), and I changed 100 to my max_sent_len of 200, then it has solved.

@markus-eberts
Copy link
Member

Okay, thank you!

@markus-eberts
Copy link
Member

I'll leave this issue open till I added the maximum size embedding count as a configuration parameter.

@markus-eberts markus-eberts reopened this Jan 13, 2022
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