You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sometimes forget that I need to specify obs_names_n as a "batch_key" when writing a yaml config for prediction. Since this is always the same and always required for prediction, isn't it possible to inject it as a default when running the predict subcommand?
batch_keys:
...obs_names_n:
attr: obs_names
Similarly, is it possible to include a default PredictionWriter callback (that can be overwritten by the yaml) whenever the CLI subcommand is predict?
I guess my ultimate goal would be this:
For most cases, you can actually use the same yaml config file for train and predict. This might be enabled if, for example, you could give a couple extra inputs at the command line at runtime to specify things like ckpt_path.
The text was updated successfully, but these errors were encountered:
I fooled with this for a while and it seems to be less trivial than I thought. I can add defaults for something like "data.batch_keys", but if for example I put this in NewLightningCLI.add_arguments_to_parser
then that becomes the default... but if you specify any data.batch_keys in your config file (which you will), then this default gets totally overridden, not added to.
If I try to add a default just for obs_names_n directly like this
jsonargparse._namespace.NSKeyError: No action for key "data.batch_keys.obs_names_n" to set its default.
which I think means that the parser considers data.batch_keys to be an input argument, but does not consider data.batch_keys.obs_names_n to be an input argument.
I sometimes forget that I need to specify
obs_names_n
as a "batch_key" when writing a yaml config for prediction. Since this is always the same and always required for prediction, isn't it possible to inject it as a default when running thepredict
subcommand?Similarly, is it possible to include a default
PredictionWriter
callback (that can be overwritten by the yaml) whenever the CLI subcommand ispredict
?I guess my ultimate goal would be this:
For most cases, you can actually use the same yaml config file for train and predict. This might be enabled if, for example, you could give a couple extra inputs at the command line at runtime to specify things like
ckpt_path
.The text was updated successfully, but these errors were encountered: