1

How can I specify command line arguments on a per module base, that are then parsed when the application is run. This is basically how ABSEIL flags work, but I would prefer a more lightweight solution. Can this be achieved with argparse or any other python library? Example:

# trainer.py
specify_argument('learning_rate', float)
...
# model.py
specify_argument('num_layers', int)
...
# main.py
def main(): 
  parse_args()
  ...

Thanks!

jvh
  • 341
  • 3
  • 15
  • I would just use abseil if you want that feature. I don't know any other library doing this. You could hand craft something, but I seriously think it's not worth the effort if abseil can do what you want. – gelonida Jun 08 '20 at 21:28

0 Answers0