textcat -> architecture extra fields not permitted
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start with the sentiment-analysis tutorial linked in the issue and the lines using nlp.create_pipe("textcat", config={"architecture": "simple_cnn"}) and textcat.add_label. Check the spaCy version expected by the tutorial against the version producing the ConfigValidationError. Done means the example runs without the extra-fields error and the label calls are valid for the supported version.
Written by the indexing model from the issue text.
Description
Good evening sir,
I've been trying to practise what I've learned from your tutorial:(https://realpython.com/sentiment-analysis-python/) using PyCharm.
And these lines:
textcat.add_label("pos")
textcat.add_label("neg")
generated a warning ==>
#Cannot find reference 'add_label' in '(Doc) -> Doc | (Doc) -> Doc'
I thought it maybe because of a difference between my spacy version and yours, so I run the script anyway, but then I got the an error from this line==>
textcat = nlp.create_pipe("textcat", config={"architecture": "simple_cnn"})
Error msg:
raise ConfigValidationError(
thinc.config.ConfigValidationError:
Config validation error
textcat -> architecture extra fields not permitted
{'nlp': <spacy.lang.en.English object at 0x0000015E74F625E0>, 'name': 'textcat', 'architecture': 'simple_cnn', 'model': {'@architectures': 'spacy.TextCatEnsemble.v2', 'linear_model': {'@architectures': 'spacy.TextCatBOW.v1', 'exclusive_classes': True, 'ngram_size': 1, 'no_output_layer': False}, 'tok2vec': {'@architectures': 'spacy.Tok2Vec.v2', 'embed': {'@architectures': 'spacy.MultiHashEmbed.v1', 'width': 64, 'rows': [2000, 2000, 1000, 1000, 1000, 1000], 'attrs': ['ORTH', 'LOWER', 'PREFIX', 'SUFFIX', 'SHAPE', 'ID'], 'include_static_vectors': False}, 'encode': {'@architectures': 'spacy.MaxoutWindowEncoder.v2', 'width': 64, 'window_size': 1, 'maxout_pieces': 3, 'depth': 2}}}, 'threshold': 0.5, '@factories': 'textcat'}
I'm very new to spacy and data analysis over all, so please excuse me if it's a stupid mistake from my side.
Thank you
- Dominant language
- Jupyter Notebook
- Stars
- 5.2k
- Forks
- 5.3k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from realpython/materials
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
realpython/materials#729 ·
-
п Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
realpython/materials#763 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
realpython/materials#738 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
realpython/materials#737 ·
-
проект2 Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
realpython/materials#725 ·
All issues in realpython/materials
Similar issues
-
DUDE_acc: an empty prediction becomes NaN after the TSV round-trip and scores the whole set at zero Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
open-compass/VLMEvalKit#1704 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
google-gemma/gemma-skills#11 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
UKGovernmentBEIS/inspect_evals#2501 ·