浏览代码

changelog, migration, fix name in obs

/v2-staging-rebase
Chris Elion 3 年前
当前提交
a70b9e73
共有 3 个文件被更改,包括 32 次插入4 次删除
  1. 9
      com.unity.ml-agents/CHANGELOG.md
  2. 7
      com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
  3. 20
      docs/Migrating.md

9
com.unity.ml-agents/CHANGELOG.md


## [Unreleased]
### Major Changes
#### com.unity.ml-agents (C#)
- Several breaking interface changes were made. See the
[Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_14_docs/docs/Migrating.md) for more
details.
`SetActionEnabled(int branch, int actionIndex, bool isEnabled)`. See the
`SetActionEnabled(int branch, int actionIndex, bool isEnabled)`. (#5060)
[Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_14_docs/docs/Migrating.md) for more
details. (#5060)
- `ISensor.GetObservationShape()` was removed, and `GetObservationSpec()` was added. (#5127)
#### ml-agents / ml-agents-envs / gym-unity (Python)
### Minor Changes

7
com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs


}
}
// Implement IEnumerable or IList?
}
var sensorName = sensor.GetName();
if (!string.IsNullOrEmpty(sensorName))
{
observationProto.Name = sensorName;
}
observationProto.ObservationType = (ObservationTypeProto)obsSpec.ObservationType;

20
docs/Migrating.md


- The `IActuator` interface now implements `IHeuristicProvider`. Please add the corresponding `Heuristic(in ActionBuffers)`
method to your custom Actuator classes.
- The `ISensor.GetObservationShape()` method was removed, and `GetObservationSpec()` was added. You can use
`ObservationSpec.Vector()` or `ObservationSpec.Visual()` to generate `ObservationSpec`s that are equivalent to
the previous shape. For example, if your old ISensor looked like:
```csharp
public override int[] GetObservationShape()
{
return new[] { m_Height, m_Width, m_NumChannels };
}
```
the equivalent code would now be
```csharp
public override ObservationSpec GetObservationSpec()
{
return ObservationSpec.Visual(m_Height, m_Width, m_NumChannels);
}
```
## Migrating to Release 13
### Implementing IHeuristic in your IActuator implementations
- If you have any custom actuators, you can now implement the `IHeuristicProvider` interface to have your actuator

正在加载...
取消
保存