new: new --skip-session for manual mode to skip session parsing
This commit is contained in:
parent
e8fa682302
commit
c6b3e11e04
@ -21,6 +21,9 @@ if __name__ == '__main__':
|
||||
help='If this file exists, configuration will be merged and this will override default values.')
|
||||
|
||||
parser.add_argument('--manual', dest="do_manual", action="store_true", default=False, help="Manual mode.")
|
||||
parser.add_argument('--skip-session', dest="skip_session", action="store_true", default=False,
|
||||
help="Skip last session parsing in manual mode.")
|
||||
|
||||
parser.add_argument('--clear', dest="do_clear", action="store_true", default=False,
|
||||
help="Clear the ePaper display and exit.")
|
||||
|
||||
@ -49,8 +52,8 @@ if __name__ == '__main__':
|
||||
elif args.do_manual:
|
||||
logging.info("entering manual mode ...")
|
||||
|
||||
agent.last_session.parse()
|
||||
|
||||
agent.last_session.parse(args.skip_session)
|
||||
if not args.skip_session:
|
||||
logging.info(
|
||||
"the last session lasted %s (%d completed epochs, trained for %d), average reward:%s (min:%s max:%s)" % (
|
||||
agent.last_session.duration_human,
|
||||
|
@ -167,7 +167,10 @@ class LastSession(object):
|
||||
self.duration_human = ', '.join(self.duration_human)
|
||||
self.avg_reward /= (self.epochs if self.epochs else 1)
|
||||
|
||||
def parse(self):
|
||||
def parse(self, skip=False):
|
||||
if skip:
|
||||
logging.debug("skipping parsing of the last session logs ...")
|
||||
else:
|
||||
logging.debug("parsing last session logs ...")
|
||||
|
||||
lines = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user