moabitcoin / cherry-pytorch

Reinforcement Learning Tutorials & other bedtime stories in PyTorch
MIT License
11 stars 1 forks source link

Add verbosity levels to training/testing the agent #1

Closed sandhawalia closed 4 years ago

sandhawalia commented 4 years ago

Currently all agents are training with logging.INFO logging enabled. We'd like to expose user configured logging level enabled from CLI

  parser = argparse.ArgumentParser('Train an RL Agent to'
                                   ' play Atari Game (DQN)')
  parser.add_argument('-x', dest='config_file', type=str,
                      help='Config for the Atari env/agent', required=True)
  parser.add_argument('-d', dest='device', choices=['gpu', 'cpu'],
                      help='Device to run the train/test', default='gpu')
  parser.add_argument('-v', dest='verbosity', choices=['info', 'debug', 'warning, 
'error'],
                      help='Logging verbosity level ', default='info')
sandhawalia commented 4 years ago

Addressed here https://github.com/moabitcoin/cherry-pytorch/pull/new/verbosity

  parser.add_argument('-l', '--log', dest='log', choices=['info', 'debug'],
                      default='info', help='Set verbosity for the logger')