✘ Config validation error - instance of model expected | with independent transformers #11372
Replies: 2 comments 2 replies
-
Before looking into what's going wrong here - while having a tok2vec and Transformer in the same pipeline at training time should technically work, it won't provide any benefit, and it may be easier to have one pipeline per token source (tok2vec/Transformer) and use |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delayed followup on this. It looks like the first issue is that the What you can do in this case is use a listener in the REL component and have two Transformers in your pipeline. If you do that you'll have to give the Transformers different names (like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm trying to create a pipeline for relation extraction. I believe that having seperate transformer / tok2vec layers for the ner and relation extraction component will increase accuracy at the cost of efficiency, but for my use case efficiency is not that important.
In my config i've defined that the ner and parser use a transformer listener, and the relation extractor defines its own transformer.
however when running
spacy train configs/config.cfg --output training --paths.train data/train.spacy --paths.dev data/dev.spacy -c ./scripts/custom_functions.py --gpu-id 0
I get the following error:
I've narrowd the problem down to having something to do with the independent transformers because when i run the same training command with a config that uses a listener for all components this issue occurs. (however no config validation error)
Entire config:
Beta Was this translation helpful? Give feedback.
All reactions