浏览代码

Resolve pre-commit issues

/MLA-1734-demo-provider
Arthur Juliani 4 年前
当前提交
ba495418
共有 2 个文件被更改,包括 9 次插入3 次删除
  1. 8
      ml-agents/mlagents/trainers/tests/simple_test_envs.py
  2. 4
      ml-agents/mlagents/trainers/tests/tensorflow/test_models.py

8
ml-agents/mlagents/trainers/tests/simple_test_envs.py


)
else:
action_spec = ActionSpec.create_continuous(action_size)
sensor_type_list = [SensorType.OBSERVATION for i in range(len(self._make_obs_spec()))]
self.behavior_spec = BehaviorSpec(self._make_obs_spec(), sensor_type_list, action_spec)
sensor_type_list = [
SensorType.OBSERVATION for i in range(len(self._make_obs_spec()))
]
self.behavior_spec = BehaviorSpec(
self._make_obs_spec(), sensor_type_list, action_spec
)
self.action_size = action_size
self.names = brain_names
self.positions: Dict[str, List[float]] = {}

4
ml-agents/mlagents/trainers/tests/tensorflow/test_models.py


def create_behavior_spec(num_visual, num_vector, vector_size):
obs_shapes = [(84, 84, 3)] * int(num_visual) + [(vector_size,)] * int(num_vector)
sensor_types = [SensorType.OBSERVATION for _ in range(len(obs_shapes))]
behavior_spec = BehaviorSpec(obs_shapes, sensor_types, ActionSpec.create_discrete((1,)))
behavior_spec = BehaviorSpec(
obs_shapes, sensor_types, ActionSpec.create_discrete((1,))
)
return behavior_spec

正在加载...
取消
保存