浏览代码

Fix pre-commit

/MLA-1734-demo-provider
Arthur Juliani 4 年前
当前提交
da9cfed3
共有 2 个文件被更改,包括 6 次插入3 次删除
  1. 2
      docs/Python-API.md
  2. 7
      ml-agents-envs/mlagents_envs/rpc_utils.py

2
docs/Python-API.md


`dimension_property` is a tuple of flags containing extra information about how the
data should be processed in the corresponding dimension. `type` is an enum
corresponding to what type of sensor is generating the data (i.e., observation, goal,
etc). Note that the `SensorSpec` have the same ordering as the ordering of observations
etc). Note that the `SensorSpec` have the same ordering as the ordering of observations
in the DecisionSteps, DecisionStep, TerminalSteps and TerminalStep.
- `action_spec` is an `ActionSpec` namedtuple that defines the number and types
of actions for the Agent.

7
ml-agents-envs/mlagents_envs/rpc_utils.py


BehaviorSpec,
DecisionSteps,
TerminalSteps,
SensorType,
)
from mlagents_envs.exception import UnityObservationException
from mlagents_envs.timers import hierarchical_timer, timed

tuple(DimensionProperty(dim) for dim in obs.dimension_properties)
for obs in agent_info.observations
]
sensor_types = [obs.sensor_type for obs in agent_info.observations]
sensor_types = [SensorType(obs.sensor_type) for obs in agent_info.observations]
for obs_shape, dim_p, sensor_type in zip(observation_shape, dim_props, sensor_types)
for obs_shape, dim_p, sensor_type in zip(
observation_shape, dim_props, sensor_types
)
]
# proto from communicator < v1.3 does not set action spec, use deprecated fields instead
if (

正在加载...
取消
保存