(v2.2.3) How to use training loop with JSON data? #10883
Unanswered
abs-xyz
asked this question in
Help: Coding & Implementations
Replies: 1 comment 4 replies
-
The v2 documentation on training your models describes changing your hyperparameters. I'd recommend switching to v3 however, since configuring this is more convenient there. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
This is regarding spaCy v2 (specifically 2.2.3). I need to change some hyperparameters.
I have seen the examples here. They use nlp.update() to set certain things. But the training data is in the form
I have JSON format data (converted from CoNLL format using
spacy convert
). How can I set values of hyperparameters?I saw this discussion. This shows how to change the dropout rate and batch sizes, but I can't find how to change the learning rate, etc.
(My main question is on how to change hyperparameters. One of the ways in some discussion was to use the training loop, but I am not sure on how to run it with the data format that I have.)
Edit:
If I do something like
learn_rate = spacy.util.env_opt("learn_rate", 0.0001)
, will this learning rate be used while training withspacy train
? (How do I confirm this?os.environ["SPACY_LEARN_RATE"]
gives a KeyError.)Also, doing something like
!learn_rate=0.0001 python -m spacy train ...
doesn't work (in a notebook).Beta Was this translation helpful? Give feedback.
All reactions