浏览代码

Add tensorboard startup on training

/develop-pyinstaller
Ervin Teng 5 年前
当前提交
02c8507b
共有 1 个文件被更改,包括 21 次插入0 次删除
  1. 21
      ml-agents/mlagents/trainers/learn.py

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


from multiprocessing import Process, Queue
import os
import sys
import glob
import shutil
import numpy as np

from tensorboard import default
from tensorboard import program
from mlagents.trainers.trainer_controller import TrainerController
from mlagents.trainers.exception import TrainerError

# Signal that environment has been launched.
process_queue.put(True)
# Launch TensorBoard
launch_tensorboard("./summaries/")
def launch_tensorboard(summary_path):
log = logging.getLogger("werkzeug") # Disable webserver logs
log.setLevel(logging.ERROR)
log = logging.getLogger("tensorboard") # Disable tensorboard logs
log.setLevel(logging.ERROR)
tb = program.TensorBoard(
default.get_plugins(), program.get_default_assets_zip_provider()
)
tb.configure(argv=[None, "--logdir", "./summaries/"])
url = tb.launch()
print("---------------------------------\n")
print("View your training progress by opening a browser at: %s \n" % url)
print("---------------------------------\n")
def create_sampler_manager(sampler_file_path, env_reset_params, run_seed=None):

正在加载...
取消
保存