Config.cfg Execution Logic #9355
-
Hi, I am trying to understand the logical flow on how Spacy uses config.cfg to create a model by studying rel_componnent. I also did the tutorial found in thinc.ai. Based on this config, how does Spacy knows it needs to build the model that is labelled as "rel_model.v1" ? From thinc.ai tutorial, there is a common pattern (as shown below) after the config file is read and resolved.
Can't seem to find similar pattern in the "rel_components" files. Could you please help me to understand the flow? I think I have looked every documentation I can read. Something still does not connect. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In the project.yml file, under the "commands" section for "train_cpu", there is an option "-c" script: Wonder what is the significance of "custom_functions.py" when it comes to training the model? |
Beta Was this translation helpful? Give feedback.
-
Hey koayst ✨,
The |
Beta Was this translation helpful? Give feedback.
Hey koayst ✨,
I think, the missing piece to better understand how the config system works is the Registry, where you can map strings like
rel_model.v1
to a function which, in this case, would return athinc model
. You can also assign additional parameters when creating new registries. Here's the example from the REL code: