浏览代码

Adding a logging utility for improved logs

/bug-failed-api-check
Anupam Bhatnagar 5 年前
当前提交
abc369a6
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 2
      ml-agents-envs/mlagents_envs/environment.py
  2. 5
      ml-agents/mlagents/trainers/learn.py
  3. 2
      ml-agents/mlagents/trainers/trainer/trainer.py

2
ml-agents-envs/mlagents_envs/environment.py


import signal
import struct
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("mlagents_envs")

5
ml-agents/mlagents/trainers/learn.py


from mlagents_envs.side_channel.side_channel import SideChannel
from mlagents_envs.side_channel.engine_configuration_channel import EngineConfig
from mlagents_envs.exception import UnityEnvironmentException
from mlagents.logging_util import create_logger
def _create_parser():

except Exception:
print("\n\n\tUnity Technologies\n")
print(get_version_string())
trainer_logger = logging.getLogger("mlagents.trainers")
env_logger = logging.getLogger("mlagents_envs")
trainer_logger = create_logger("mlagents.trainers")
env_logger = create_logger("mlagents_envs")
if options.debug:
trainer_logger.setLevel("DEBUG")

2
ml-agents/mlagents/trainers/trainer/trainer.py


)
if stats_summary.num > 0:
LOGGER.info(
" {}: {}: Step: {}. "
"{}: {}: Step: {}. "
"Time Elapsed: {:0.3f} s "
"Mean "
"Reward: {:0.3f}"

正在加载...
取消
保存