rel_component issue with training my data #10912
Unanswered
Sujith1909
asked this question in
Help: Coding & Implementations
Replies: 1 comment 4 replies
-
Instances are generated using the
Scanning your data the info seems fine and it doesn't seem like 2 is the case, so maybe your conversion is going wrong. Can you share the code you are using to convert the JSON into Docs, and the resulting |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I hope you are doing well. I read an article (https://towardsdatascience.com/how-to-train-a-joint-entities-and-relation-extraction-classifier-using-bert-transformer-with-spacy-49eb08d91b5c) and followed all the steps to train the rel_component spacy with my custom data.
im getting this error while training with tok2vec
"could not determine any instance in the doc"
while training with transformer it is not showing this but the score is staying same for all the iterations.
[2022-06-03 17:26:19,936] [INFO] Set up nlp object from config
[2022-06-03 17:26:19,944] [INFO] Pipeline: ['transformer', 'relation_extractor']
[2022-06-03 17:26:19,948] [INFO] Created vocabulary
[2022-06-03 17:26:19,949] [INFO] Finished initializing nlp object
Downloading: 100% 481/481 [00:00<00:00, 507kB/s]
Downloading: 100% 878k/878k [00:00<00:00, 4.37MB/s]
Downloading: 100% 446k/446k [00:00<00:00, 3.12MB/s]
Downloading: 100% 1.29M/1.29M [00:00<00:00, 7.52MB/s]
Downloading: 100% 478M/478M [00:06<00:00, 72.8MB/s]
Some weights of the model checkpoint at roberta-base were not used when initializing RobertaModel: ['lm_head.layer_norm.weight', 'lm_head.dense.bias', 'lm_head.bias', 'lm_head.decoder.weight', 'lm_head.layer_norm.bias', 'lm_head.dense.weight']
[2022-06-03 17:26:41,811] [INFO] Initialized pipeline components: ['transformer', 'relation_extractor']
✔ Initialized pipeline
============================= Training pipeline =============================
ℹ Pipeline: ['transformer', 'relation_extractor']
ℹ Initial learn rate: 0.0
E # LOSS TRANS... LOSS RELAT... REL_MICRO_P REL_MICRO_R REL_MICRO_F SCORE
0 0 0.82 2.91 0.03 90.24 0.06 0.00
2 100 129.71 74.40 0.00 0.00 0.00 0.00
5 200 0.00 0.27 0.00 0.00 0.00 0.00
8 300 0.00 0.27 0.00 0.00 0.00 0.00
11 400 0.00 0.27 0.00 0.00 0.00 0.00
14 500 0.00 0.27 0.00 0.00 0.00 0.00
17 600 0.00 0.27 0.00 0.00 0.00 0.00
20 700 0.00 0.27 0.00 0.00 0.00 0.00
I read the previous discussion and tried to increase the max_len from 100 to 300, but still there is no change.
relations_train.txt
rel_trf.txt
rel_tok2vec.txt
I am thinking that there is something wrong with the relations.txt or I am missing an important step.
Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions