Skip to content

Commit

Permalink
Fix logging format in ApeX
Browse files Browse the repository at this point in the history
  • Loading branch information
keiohta committed Jun 27, 2019
1 parent 8765e2f commit eb3c9f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tf2rl/algos/apex.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def import_tf():
print(e)
return tf

logging.root.handlers[0].setFormatter(logging.Formatter(
fmt='%(asctime)s [%(levelname)s] (%(filename)s:%(lineno)s) %(message)s'))


def explorer(global_rb, queue, trained_steps, is_training_done,
lock, env_fn, policy_fn, set_weights_fn, noise_level,
Expand Down Expand Up @@ -393,9 +396,6 @@ def prepare_experiment(env, args):


def run(args, env_fn, policy_fn, get_weights_fn, set_weights_fn):
logging.basicConfig(
datefmt="%d/%Y %I:%M:%S",
format='%(asctime)s [%(levelname)s] (%(filename)s:%(lineno)s) %(message)s')
logging.getLogger().setLevel(logging.getLevelName(args.logging_level))

if args.n_env > 1:
Expand Down

0 comments on commit eb3c9f3

Please sign in to comment.