Closed attardi closed 3 years ago
@attardi Sorry there may be some confusion. You still have to provide some values on command-line. The priority is: argparse > config.ini > others. config.ini provides many default hyperparams for training, which are usually not changed. argparse gives you more flexible choices. You can specify some params on command-line not registered in argparse but stored in config file.
Then why do you specify
[Data]
encoder = 'bert'
in ud.biaffine.dep.xlmr.ini?
What's the point if it is ignored?
Because I forgot to delete them from argparse 😓 .
There are three types of defaults:
To me this would be the most sensible priority order.
Indeed many args in config are useless, just suggestions for appropriate ones.
The logic of a config file is to collect in one place all parameters needed in an experiment. They should override the defaults. You may then individually override some of them on the command line, as a last minute minor variation. In your interpretation, you might just as well get rid of the config file, since it is useless.
The priority is: argparse > config.ini > others.
The argparse is always present with a default value, which might be overwritten in the command line, hence config.ini is useless.
@attardi Yeah, but I think it's trivial to register many params like lr
, epochs
in argparse.
I have a config.ini file that contains:
but when calling the parser with -c=config.ini, it gets overwritten by the default value 'lstm'. I would expect that values provided through config.ini would replace the defaults, or else I don't see the point of providing a config file.