I have been using the argparse for my latest project and although it is extremely helpful, I have realized that most of the time, especially in longer scripts, I try to avoid using the variable with the 'args.' prefix, so lines like this are bloating my code:
parser.add_argument('--learning_rate', '--lr', default=0.0005, type=float, help='defines the learning_rate variable for the model.')
learning_rate = args.learning_rate
is there an option to automatically store the content passed to --learning_rate
into learning_rate
, avoiding this second line of code?
Thanks for your time and attention.