浏览代码

recieves brain_name and identifier on python side

/develop/magic-string
Andrew Cohen 5 年前
当前提交
96922f84
共有 3 个文件被更改,包括 3 次插入4 次删除
  1. 2
      ml-agents/mlagents/trainers/ppo/trainer.py
  2. 4
      ml-agents/mlagents/trainers/sac/trainer.py
  3. 1
      ml-agents/mlagents/trainers/trainer_util.py

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


import numpy as np
from mlagents.trainers.brain import BrainParameters, BrainInfo
from mlagents.envs.brain import BrainParameters, BrainInfo
from mlagents.trainers.ppo.policy import PPOPolicy
from mlagents.trainers.ppo.multi_gpu_policy import MultiGpuPPOPolicy, get_devices
from mlagents.trainers.rl_trainer import RLTrainer, AllRewardsOutput

4
ml-agents/mlagents/trainers/sac/trainer.py


import numpy as np
from mlagents.trainers.brain import BrainParameters, BrainInfo
from mlagents.trainers.action_info import ActionInfoOutputs
from mlagents.envs.brain import BrainParameters, BrainInfo
from mlagents.envs.action_info import ActionInfoOutputs
from mlagents.envs.timers import timed
from mlagents.trainers.sac.policy import SACPolicy
from mlagents.trainers.rl_trainer import RLTrainer, AllRewardsOutput

1
ml-agents/mlagents/trainers/trainer_util.py


:return:
"""
trainer_parameters = trainer_config["default"].copy()
brain_name, brain_name_identifiers = brain_parameters.brain_name.split("?")
trainer_parameters["summary_path"] = "{basedir}/{name}".format(
basedir=summaries_dir, name=str(run_id) + "_" + brain_name
)

正在加载...
取消
保存