浏览代码

fixed more ci problems/removed self.policies

/develop/magic-string
Andrew Cohen 5 年前
当前提交
fc485077
共有 3 个文件被更改,包括 10 次插入6 次删除
  1. 2
      ml-agents/mlagents/trainers/rl_trainer.py
  2. 13
      ml-agents/mlagents/trainers/trainer.py
  3. 1
      ml-agents/mlagents/trainers/trainer_controller.py

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


"""
policy = self.create_policy(brain_parameters)
self.policy = policy
self.policies[brain_parameters.brain_name] = policy
# self.policies[brain_parameters.brain_name] = policy
def advance(self):
"""

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


self.summary_writer = tf.summary.FileWriter(self.summary_path)
self._reward_buffer: Deque[float] = deque(maxlen=reward_buff_cap)
self.policy: TFPolicy
self.policies: Dict[str, TFPolicy] = {}
self.step: int = 0
def check_param_keys(self):

"""
Creates policy
"""
raise UnityTrainerException("The update_model method was not implemented.")
raise UnityTrainerException("The create_policy method was not implemented.")
def add_policy(self, brain_parameters: BrainParameters) -> None:
"""
Adds policy to trainer
"""
raise UnityTrainerException("The add_policy method was not implemented.")
Gets policy from trainers list of policies
Gets policy from trainer
return self.policies[brain_name]
return self.policy
def advance(self) -> None:
pass

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


:param resampling_interval: Specifies number of simulation steps after which reset parameters are resampled.
"""
self.trainers: Dict[str, Trainer] = {}
self.multi_trainers: Dict[str, Trainer] = {}
self.brain_name_to_identifier: Dict[str, Set] = defaultdict(set)
self.trainer_factory = trainer_factory
self.model_path = model_path

正在加载...
取消
保存