浏览代码

fixed settings imports for active learning

/active-variablespeed
Scott Jordan 4 年前
当前提交
d188890b
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 12
      ml-agents/mlagents/trainers/settings.py

12
ml-agents/mlagents/trainers/settings.py


parameters: Dict[str, UniformSettings]
active_learning: Optional[ActiveLearnerSettings] = None
num_repeat:int=8
num_batch:int=16
num_repeat:Optional[int]=1
num_batch:Optional[int]=1
@staticmethod
def structure(d: Mapping, t: type) -> Dict[str, "TaskParameterSettings"]:

for behavior_name, behavior_config in d.items():
activelearner_settings = None
tmp_settings: Dict[str, UniformSettings] = {}
num_repeat = 1
num_batch = 1
elif agent_parameter == "num_repeat":
num_repeat = agent_parameter_config
elif agent_parameter == "num_batch":
num_batch = agent_parameter_config
d_final[behavior_name] = TaskParameterSettings(parameters=tmp_settings, active_learning=activelearner_settings)
d_final[behavior_name] = TaskParameterSettings(parameters=tmp_settings, active_learning=activelearner_settings, num_batch=num_batch, num_repeat=num_repeat)
return d_final

正在加载...
取消
保存