[Task]: Configuration sharing (like _BASE_
in detectron2) + kwargs overwriting
#1250
Unanswered
DominikFilipiak
asked this question in
Feature Requests
Replies: 1 comment
-
@DominikFilipiak, we are already working on this, which will be available in v1.0. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
What is the motivation for this task?
When doing experiments, we often make small changes to the YAML config by hand and see what's the output of the model.
These configs will share the vast majority of their parameters.
Since the number of configs quickly rises up, it's easy to get lost.
Therefore, I think it would be nice to have a config inheritance mechanism.
So, we'd have a
base config
, and a set of additional configs.We pass
additional config
to the train/test script and pull everything frombase
(location defined by, say,_BASE_
keyword inadditional config
) and overwrite keys defined inadditional
.This forms a
combined
config, which is the final one.Additionally, if a user will provide a keyword argument (e.g.
--ops model.n_features=50 model.backbone=resnet18
) to the script, it should overwrite values in thecombined
config.I think it should be implemented in train/test scripts
Describe the solution you'd like
It's nicely done in
detectron2
(both of my remarks are, actually) with their YACS configs.In short, in their YAML config, there's a top-level key
_BASE_
, which specifies thebase config
path.You may also want to check
load_yaml_with_base
function definition.Here's an example --
_BASE_
is defined on the first line.With regard to the second remark, they provide scripts which can be used like this (see again YACS configs).
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions