HOW TO: add a custom augmenter #12587
JeremyCraigMartinez
started this conversation in
Help: Best practices
Replies: 1 comment
-
You include your code the same way you include any custom training code, e.g. with the spacy train config.cfg --code functions.py See: https://spacy.io/usage/training#custom-code (Alternatively, if you want to use these functions in many different projects, you can use entry points to provide registered functions from a separate installed python package, and then you don't need any extra |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ASK: how do I add my own custom augmenter
There is an excellent example to work off of. However, this demonstrates how to either:
My question is, how could I blend these two approaches and leverage a custom augmenter during training?
I wanted to work off of the ner demo. I added a directory with an augmenter
(venv) jeremy.martinez ~/code/projects/pipelines/ner_demo (v3) $ tree augmenters/ augmenters/ └── redact.py
and the contents of redact.py are just a dummy filler for the moment until I can confirm that it is being incorporated
I edited the config.cfg to reflect the following change:
Now running
python -m spacy project run train
I get the following error:Which makes complete sense, since I am not incorporating this redact augmenter anywhere. My question is: how do I incorporate this custom augmenter?
Beta Was this translation helpful? Give feedback.
All reactions