1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

Modifying ScreenLogger to optionally not output color codes (#56)

* Modifying ScreenLogger to not output color when configured by new CLI parameter
This commit is contained in:
Leo Dirac
2018-11-05 15:25:49 -08:00
committed by Scott Leishman
parent 7e7006305a
commit d75df17d97
2 changed files with 48 additions and 14 deletions

View File

@@ -408,6 +408,9 @@ def main():
help="(flag) TensorFlow verbosity level",
default=3,
type=int)
parser.add_argument('--nocolor',
help="(flag) Turn off color-codes in screen logging. Ascii text only",
action='store_true')
parser.add_argument('-s', '--checkpoint_save_secs',
help="(int) Time in seconds between saving checkpoints of the model.",
default=None,
@@ -495,6 +498,9 @@ def main():
args = parse_arguments(parser)
if args.nocolor:
screen.set_use_colors(False)
graph_manager = get_graph_manager_from_args(args)
if args.distributed_coach and not graph_manager.agent_params.algorithm.distributed_coach_synchronization_type: