Skip to content

Commit 6de76f4

Browse files
Chris Elionvincentpierre
authored andcommitted
Migration guide - list removed APIs with replacements (#5307)
* list removed APIs with replacements * fixes
1 parent a5ef163 commit 6de76f4

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

com.unity.ml-agents/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ be used to set the random seed on the resulting action space. (#5303)
2121
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
2222
- The minimum supported Unity version was updated to 2019.4. (#5166)
2323
- Several breaking interface changes were made. See the
24-
[Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_14_docs/docs/Migrating.md) for more
24+
[Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_17_docs/docs/Migrating.md) for more
2525
details.
2626
- Some methods previously marked as `Obsolete` have been removed. If you were using these methods, you need to replace them with their supported counterpart.
2727
- The interface for disabling discrete actions in `IDiscreteActionMask` has changed.

docs/Migrating.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
# Upgrading
22

3-
## :warning: Warning :warning:
4-
5-
The C# editor code and python trainer code are not compatible between releases.
6-
This means that if you upgrade one, you _must_ upgrade the other as well. If you
7-
experience new errors or unable to connect to training after updating, please
8-
double-check that the versions are in the same. The versions can be found in
9-
10-
- `Academy.k_ApiVersion` in Academy.cs
11-
([example](https://github.com/Unity-Technologies/ml-agents/blob/b255661084cb8f701c716b040693069a3fb9a257/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs#L95))
12-
- `UnityEnvironment.API_VERSION` in environment.py
13-
([example](https://github.com/Unity-Technologies/ml-agents/blob/b255661084cb8f701c716b040693069a3fb9a257/ml-agents-envs/mlagents/envs/environment.py#L45))
14-
15-
163
# Migrating
174
## Migrating the package to version 2.0
185
- The official version of Unity ML-Agents supports is now 2019.4 LTS. If you run
196
into issues, please consider deleting your project's Library folder and reponening your
207
project.
218
- If you used any of the APIs that were deprecated before version 2.0, you need to use their replacement. These
229
deprecated APIs have been removed. See the migration steps bellow for specific API replacements.
10+
11+
### Deprecated methods removed
12+
| **Deprecated API** | **Suggested Replacement** |
13+
|:-------:|:------:|
14+
| `IActuator ActuatorComponent.CreateActuator()` | `IActuator[] ActuatorComponent.CreateActuators()` |
15+
| `IActionReceiver.PackActions(in float[] destination)` | none |
16+
| `Agent.CollectDiscreteActionMasks(DiscreteActionMasker actionMasker)` | `Agent.WriteDiscreteActionMask(IDiscreteActionMask actionMask)` |
17+
| `Agent.Heuristic(float[] actionsOut)` | `Agent.Heuristic(in ActionBuffers actionsOut)` |
18+
| `Agent.OnActionReceived(float[] vectorAction)` | `Agent.OnActionReceived(ActionBuffers actions)` |
19+
| `Agent.GetAction()` | `Agent.GetStoredActionBuffers()` |
20+
| `BrainParameters.SpaceType`, `VectorActionSize`, `VectorActionSpaceType`, and `NumActions` | `BrainParameters.ActionSpec` |
21+
| `ObservationWriter.AddRange(IEnumerable<float> data, int writeOffset = 0)` | `ObservationWriter. AddList(IList<float> data, int writeOffset = 0` |
22+
| `SensorComponent.IsVisual()` and `IsVector()` | none |
23+
| `VectorSensor.AddObservation(IEnumerable<float> observation)` | `VectorSensor.AddObservation(IList<float> observation)` |
24+
| `SideChannelsManager` | `SideChannelManager` |
25+
2326
### IDiscreteActionMask changes
2427
- The interface for disabling specific discrete actions has changed. `IDiscreteActionMask.WriteMask()` was removed,
2528
and replaced with `SetActionEnabled()`. Instead of returning an IEnumerable with indices to disable, you can

0 commit comments

Comments
 (0)