Allow CLI overrides of project.yml #8726
BramVanroy
started this conversation in
New Features & Project Ideas
Replies: 1 comment 2 replies
-
Hm, have you actually tried this?
or perhaps
I thought that should work? cf. a previous discussion & issue reported here: #7734 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
You can overwrite options of the training config file, like so
This is useful in its own right but it would be very helpful if the same can be applied to the project.yml file. That would make a lot of sense if you want to train a model with the same pipeline and data, but different configs. You could then even overwrite config values in one go.
Take for example this (incomplete) project.yml.
As it is implemented now, running
spacy project run train
will always interpolate toBut it would be very useful to be have a dynamic project.yml file as well which can pass its dynamic values to the commands. That allows us to do something like:
If
batch_size was not a var in project.yml but only present in the config file under
training.batch_size`, you would then be able to do something likeSo overwriting values in project.yml as well as in the related config file.
The major advantage is that you only need one project file with rather static components in the workflow (e.g. data preprocessing) and other dynamic ones (training and packaging). It is a very DRY approach of project management - you do not need to repeat anything across different clones of a project. Particularly in terms of data/assets this is a plus.
My use case is that I am training different models on the same data, both in terms of architecture and hyperparameters. I could call data preparation scripts separately and then run
spacy train
for the separate models, but that defeats the purpose of having a project file in the first place. In other words: I still want to use the workflows in the project.yml file, but more dynamically.Beta Was this translation helpful? Give feedback.
All reactions