From babe957ae1e962866d70bbc2c0716deeea2ce5da Mon Sep 17 00:00:00 2001 From: vincentpierre Date: Thu, 23 Apr 2020 12:08:57 -0700 Subject: [PATCH 1/5] Edited the documetation and renamed a few things --- com.unity.ml-agents/CHANGELOG.md | 5 ++++ docs/Custom-SideChannels.md | 10 ++++---- docs/Migrating.md | 9 +++++++ docs/Python-API.md | 25 +++++++------------ docs/Training-Curriculum-Learning.md | 4 +-- docs/Using-Tensorboard.md | 4 +-- .../environment_parameters_channel.py | 4 +-- .../mlagents/trainers/simple_env_manager.py | 2 +- .../trainers/subprocess_env_manager.py | 2 +- 9 files changed, 36 insertions(+), 29 deletions(-) diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 2bdbdb98e5..73e1567747 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -37,6 +37,11 @@ and this project adheres to - The obsolete `Agent` methods `GiveModel`, `Done`, `InitializeAgent`, `AgentAction` and `AgentReset` have been removed. - The GhostTrainer has been extended to support asymmetric games and the asymmetric example environment Strikers Vs. Goalie has been added. +- The SideChannel API has changed: + - `EnvironmentParameters` replaces the default `FloatPropertiesChannel`. You can access the `EnvironmentParameters` with `Academy.Instance.EnvironmentParameters` on C# and create an `EnvironmentParametersChannel` on Python + - `SideChannelUtils` was renamed `SideChannelManager` + - The `Academy` instance now has a `StatsRecorder` property + - `SideChannelManager.GetSideChannel(s)` has been removed from the API ### Minor Changes diff --git a/docs/Custom-SideChannels.md b/docs/Custom-SideChannels.md index e0a6568f2c..b93e4fe30e 100644 --- a/docs/Custom-SideChannels.md +++ b/docs/Custom-SideChannels.md @@ -3,7 +3,7 @@ You can create your own side channel in C# and Python and use it to communicate custom data structures between the two. This can be useful for situations in which the data to be sent is too complex or structured for the built-in -`FloatPropertiesChannel`, or is not related to any specific agent, and therefore +`EnvironmentParameters`, or is not related to any specific agent, and therefore inappropriate as an agent observation. ## Overview @@ -24,7 +24,7 @@ To send data from C# to Python, create an `OutgoingMessage` instance, add data t `base.QueueMessageToSend(msg)` method inside the side channel, and call the `OutgoingMessage.Dispose()` method. -To register a side channel on the Unity side, call `SideChannelUtils.RegisterSideChannel` with the side channel +To register a side channel on the Unity side, call `SideChannelManager.RegisterSideChannel` with the side channel as only argument. ### Python side @@ -122,8 +122,8 @@ public class RegisterStringLogSideChannel : MonoBehaviour // When a Debug.Log message is created, we send it to the stringChannel Application.logMessageReceived += stringChannel.SendDebugStatementToPython; - // The channel must be registered with the SideChannelUtils class - SideChannelUtils.RegisterSideChannel(stringChannel); + // The channel must be registered with the SideChannelManager class + SideChannelManager.RegisterSideChannel(stringChannel); } public void OnDestroy() @@ -131,7 +131,7 @@ public class RegisterStringLogSideChannel : MonoBehaviour // De-register the Debug.Log callback Application.logMessageReceived -= stringChannel.SendDebugStatementToPython; if (Academy.IsInitialized){ - SideChannelUtils.UnregisterSideChannel(stringChannel); + SideChannelManager.UnregisterSideChannel(stringChannel); } } diff --git a/docs/Migrating.md b/docs/Migrating.md index e2cdba355c..beed9659bc 100644 --- a/docs/Migrating.md +++ b/docs/Migrating.md @@ -33,6 +33,11 @@ double-check that the versions are in the same. The versions can be found in - The signature of `Agent.Heuristic()` was changed to take a `float[]` as a parameter, instead of returning the array. This was done to prevent a common source of error where users would return arrays of the wrong size. +- The SideChannel API has changed: + - `EnvironmentParameters` replaces the default `FloatPropertiesChannel`. You can access the `EnvironmentParameters` with `Academy.Instance.EnvironmentParameters` + - `SideChannelUtils` was renamed `SideChannelManager` + - The `Academy` instance now has a `StatsRecorder` property + - `SideChannelManager.GetSideChannel(s)` has been removed from the API ### Steps to Migrate @@ -54,6 +59,10 @@ double-check that the versions are in the same. The versions can be found in - If your Agent class overrides `Heuristic()`, change the signature to `public override void Heuristic(float[] actionsOut)` and assign values to `actionsOut` instead of returning an array. +- If you used `SideChannels` you must: + - Replace `SideChannelUtils` with `SideChannelManager` + - Replace `SideChannelUtils.GetSideChannel()` with `Academy.Instance.EnvironmentParameters` + - Replace `SideChannelUtils.GetSideChannel()` with `Academy.Instance.StatsRecorder` ## Migrating from 0.14 to 0.15 diff --git a/docs/Python-API.md b/docs/Python-API.md index 4cbee7f06f..98ab82e291 100644 --- a/docs/Python-API.md +++ b/docs/Python-API.md @@ -306,41 +306,34 @@ i = env.reset() ... ``` -#### FloatPropertiesChannel -The `FloatPropertiesChannel` will allow you to get and set pre-defined numerical values in the environment. This can be useful for adjusting environment-specific settings, or for reading non-agent related information from the environment. You can call `get_property` and `set_property` on the side channel to read and write properties. +#### EnvironmentParameters +The `EnvironmentParameters` will allow you to get and set pre-defined numerical values in the environment. This can be useful for adjusting environment-specific settings, or for reading non-agent related information from the environment. You can call `get_property` and `set_property` on the side channel to read and write properties. -`FloatPropertiesChannel` has three methods: +`EnvironmentParametersChannel` has one methods: - * `set_property` Sets a property in the Unity Environment. + * `set_float_parameter` Sets a float parameter in the Unity Environment. * key: The string identifier of the property. * value: The float value of the property. - * `get_property` Gets a property in the Unity Environment. If the property was not found, will return None. - * key: The string identifier of the property. - - * `list_properties` Returns a list of all the string identifiers of the properties - ```python from mlagents_envs.environment import UnityEnvironment -from mlagents_envs.side_channel.float_properties_channel import FloatPropertiesChannel +from mlagents_envs.side_channel.environment_parameters_channel import EnvironmentParametersChannel -channel = FloatPropertiesChannel() +channel = EnvironmentParametersChannel() env = UnityEnvironment(side_channels=[channel]) -channel.set_property("parameter_1", 2.0) +channel.set_float_parameter("parameter_1", 2.0) i = env.reset() - -readout_value = channel.get_property("parameter_2") ... ``` Once a property has been modified in Python, you can access it in C# after the next call to `step` as follows: ```csharp -var sharedProperties = SideChannelUtils.GetSideChannel(); -float property1 = sharedProperties.GetPropertyWithDefault("parameter_1", 0.0f); +var envParameters = Academy.Instance.EnvironmentParameters; +float property1 = envParameters.GetPropertyWithDefault("parameter_1", 0.0f); ``` #### Custom side channels diff --git a/docs/Training-Curriculum-Learning.md b/docs/Training-Curriculum-Learning.md index 38885287ea..cb0203c8d2 100644 --- a/docs/Training-Curriculum-Learning.md +++ b/docs/Training-Curriculum-Learning.md @@ -40,8 +40,8 @@ the same environment. In order to define the curricula, the first step is to decide which parameters of the environment will vary. In the case of the Wall Jump environment, -the height of the wall is what varies. We define this as a `Shared Float Property` -that can be accessed in `SideChannelUtils.GetSideChannel()`, and by doing +the height of the wall is what varies. We define this as a `Environment Parameters` +that can be accessed in `Academy.Instance.EnvironmentParameters`, and by doing so it becomes adjustable via the Python API. Rather than adjusting it by hand, we will create a YAML file which describes the structure of the curricula. Within it, we can specify which diff --git a/docs/Using-Tensorboard.md b/docs/Using-Tensorboard.md index 6e818fc87d..d4b2c262cb 100644 --- a/docs/Using-Tensorboard.md +++ b/docs/Using-Tensorboard.md @@ -95,6 +95,6 @@ To get custom metrics from a C# environment into Tensorboard, you can use the StatsSideChannel: ```csharp -var statsSideChannel = SideChannelUtils.GetSideChannel(); -statsSideChannel.AddStat("MyMetric", 1.0); +var statsRecorder = Academy.Instance.StatsRecorder; +statsSideChannel.Add("MyMetric", 1.0); ``` diff --git a/ml-agents-envs/mlagents_envs/side_channel/environment_parameters_channel.py b/ml-agents-envs/mlagents_envs/side_channel/environment_parameters_channel.py index da43ce4e32..958364b675 100644 --- a/ml-agents-envs/mlagents_envs/side_channel/environment_parameters_channel.py +++ b/ml-agents-envs/mlagents_envs/side_channel/environment_parameters_channel.py @@ -8,7 +8,7 @@ class EnvironmentParametersChannel(SideChannel): """ This is the SideChannel for sending environment parameters to Unity. You can send parameters to an environment with the command - set_float_property. + set_float_parameter. """ class EnvironmentDataTypes(IntEnum): @@ -24,7 +24,7 @@ def on_message_received(self, msg: IncomingMessage) -> None: + "this should not have happend." ) - def set_float_property(self, key: str, value: float) -> None: + def set_float_parameter(self, key: str, value: float) -> None: """ Sets a float environment parameter in the Unity Environment. :param key: The string identifier of the parameter. diff --git a/ml-agents/mlagents/trainers/simple_env_manager.py b/ml-agents/mlagents/trainers/simple_env_manager.py index fce80ce30e..eca037783e 100644 --- a/ml-agents/mlagents/trainers/simple_env_manager.py +++ b/ml-agents/mlagents/trainers/simple_env_manager.py @@ -44,7 +44,7 @@ def _reset_env( ) -> List[EnvironmentStep]: # type: ignore if config is not None: for k, v in config.items(): - self.env_params.set_float_property(k, v) + self.env_params.set_float_parameter(k, v) self.env.reset() all_step_result = self._generate_all_results() self.previous_step = EnvironmentStep(all_step_result, 0, {}, {}) diff --git a/ml-agents/mlagents/trainers/subprocess_env_manager.py b/ml-agents/mlagents/trainers/subprocess_env_manager.py index 3b4133ef78..35817b150a 100644 --- a/ml-agents/mlagents/trainers/subprocess_env_manager.py +++ b/ml-agents/mlagents/trainers/subprocess_env_manager.py @@ -170,7 +170,7 @@ def external_brains(): _send_response(EnvironmentCommand.EXTERNAL_BRAINS, external_brains()) elif req.cmd == EnvironmentCommand.RESET: for k, v in req.payload.items(): - env_parameters.set_float_property(k, v) + env_parameters.set_float_parameter(k, v) env.reset() all_step_result = _generate_all_results() _send_response(EnvironmentCommand.RESET, all_step_result) From 050dfbe9d6d3736c717dedd57cecaef0f4006ade Mon Sep 17 00:00:00 2001 From: vincentpierre Date: Thu, 23 Apr 2020 14:18:18 -0700 Subject: [PATCH 2/5] addressing comments --- com.unity.ml-agents/CHANGELOG.md | 30 ++++++++--------- com.unity.ml-agents/Runtime/Academy.cs | 2 +- .../Runtime/EnvironmentParameters.cs | 2 +- .../EnvironmentParametersChannel.cs | 5 +-- .../SideChannels/FloatPropertiesChannel.cs | 6 ++-- .../Tests/Editor/SideChannelTests.cs | 14 ++++---- docs/Migrating.md | 33 ++++++++++--------- ml-agents-envs/mlagents_envs/environment.py | 2 +- 8 files changed, 48 insertions(+), 46 deletions(-) diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 73e1567747..02473c4d03 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -13,10 +13,6 @@ and this project adheres to - The `--load` and `--train` command-line flags have been deprecated. Training now happens by default, and use `--resume` to resume training instead. (#3705) - The Jupyter notebooks have been removed from the repository. -- Introduced the `SideChannelUtils` to register, unregister and access side - channels. -- `Academy.FloatProperties` was removed, please use - `SideChannelUtils.GetSideChannel()` instead. - Removed the multi-agent gym option from the gym wrapper. For multi-agent scenarios, use the [Low Level Python API](../docs/Python-API.md). - The low level Python API has changed. You can look at the document @@ -36,26 +32,30 @@ and this project adheres to communication between Unity and the Python process. - The obsolete `Agent` methods `GiveModel`, `Done`, `InitializeAgent`, `AgentAction` and `AgentReset` have been removed. -- The GhostTrainer has been extended to support asymmetric games and the asymmetric example environment Strikers Vs. Goalie has been added. -- The SideChannel API has changed: - - `EnvironmentParameters` replaces the default `FloatPropertiesChannel`. You can access the `EnvironmentParameters` with `Academy.Instance.EnvironmentParameters` on C# and create an `EnvironmentParametersChannel` on Python - - `SideChannelUtils` was renamed `SideChannelManager` +- The GhostTrainer has been extended to support asymmetric games and the + asymmetric example environment Strikers Vs. Goalie has been added. +- The SideChannel API has changed (#3833, #3660) : + - Introduced the `SideChannelManager` to register, unregister and access side + channels. + - `EnvironmentParameters` replaces the default `FloatProperties`. + You can access the `EnvironmentParameters` with + `Academy.Instance.EnvironmentParameters` on C# and create an + `EnvironmentParametersChannel` on Python + - `SideChannel.OnMessageReceived` is now a protected method (was public) - The `Academy` instance now has a `StatsRecorder` property - - `SideChannelManager.GetSideChannel(s)` has been removed from the API + - SideChannel IncomingMessages methods now take an optional default argument, + which is used when trying to read more data than the message contains. + - Added a feature to allow sending stats from C# environments to TensorBoard + (and other python StatsWriters). To do this from your code, use + `Academy.Instance.StatsRecorder.Add(key, value)`(#3660) ### Minor Changes - Format of console output has changed slightly and now matches the name of the model/summary directory. (#3630, #3616) -- Added a feature to allow sending stats from C# environments to TensorBoard - (and other python StatsWriters). To do this from your code, use - `SideChannelUtils.GetSideChannel().AddStat(key, value)` - (#3660) - Renamed 'Generalization' feature to 'Environment Parameter Randomization'. - Timer files now contain a dictionary of metadata, including things like the package version numbers. -- SideChannel IncomingMessages methods now take an optional default argument, - which is used when trying to read more data than the message contains. - The way that UnityEnvironment decides the port was changed. If no port is specified, the behavior will depend on the `file_name` parameter. If it is `None`, 5004 (the editor port) will be used; otherwise 5005 (the base diff --git a/com.unity.ml-agents/Runtime/Academy.cs b/com.unity.ml-agents/Runtime/Academy.cs index 045c87b445..ad1adab06e 100644 --- a/com.unity.ml-agents/Runtime/Academy.cs +++ b/com.unity.ml-agents/Runtime/Academy.cs @@ -58,7 +58,7 @@ public class Academy : IDisposable /// on each side, although we may allow some flexibility in the future. /// This should be incremented whenever a change is made to the communication protocol. /// - const string k_ApiVersion = "0.16.0"; + const string k_ApiVersion = "0.17.0"; /// /// Unity package version of com.unity.ml-agents. diff --git a/com.unity.ml-agents/Runtime/EnvironmentParameters.cs b/com.unity.ml-agents/Runtime/EnvironmentParameters.cs index a86642cedc..9784a5b13b 100644 --- a/com.unity.ml-agents/Runtime/EnvironmentParameters.cs +++ b/com.unity.ml-agents/Runtime/EnvironmentParameters.cs @@ -38,7 +38,7 @@ internal EnvironmentParameters() /// public float GetParameterWithDefault(string key, float defaultValue) { - return m_Channel.GetParameterWithDefault(key, defaultValue); + return m_Channel.GetWithDefault(key, defaultValue); } /// diff --git a/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs b/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs index 23710f68c4..79751e1789 100644 --- a/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs +++ b/com.unity.ml-agents/Runtime/SideChannels/EnvironmentParametersChannel.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System; +using UnityEngine; namespace MLAgents.SideChannels { @@ -49,7 +50,7 @@ protected override void OnMessageReceived(IncomingMessage msg) } else { - throw new UnityAgentsException("EnvironmentParametersChannel only supports floats."); + Debug.LogWarning("EnvironmentParametersChannel received an unknown data type.") } } @@ -60,7 +61,7 @@ protected override void OnMessageReceived(IncomingMessage msg) /// Parameter key. /// Default value to return. /// - public float GetParameterWithDefault(string key, float defaultValue) + public float GetWithDefault(string key, float defaultValue) { float valueOut; bool hasKey = m_Parameters.TryGetValue(key, out valueOut); diff --git a/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs b/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs index f9c402fb39..06753b69a9 100644 --- a/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs +++ b/com.unity.ml-agents/Runtime/SideChannels/FloatPropertiesChannel.cs @@ -43,7 +43,7 @@ protected override void OnMessageReceived(IncomingMessage msg) } /// - public void SetProperty(string key, float value) + public void Set(string key, float value) { m_FloatProperties[key] = value; using (var msgOut = new OutgoingMessage()) @@ -59,7 +59,7 @@ public void SetProperty(string key, float value) } /// - public float GetPropertyWithDefault(string key, float defaultValue) + public float GetWithDefault(string key, float defaultValue) { float valueOut; bool hasKey = m_FloatProperties.TryGetValue(key, out valueOut); @@ -73,7 +73,7 @@ public void RegisterCallback(string key, Action action) } /// - public IList ListProperties() + public IList List() { return new List(m_FloatProperties.Keys); } diff --git a/com.unity.ml-agents/Tests/Editor/SideChannelTests.cs b/com.unity.ml-agents/Tests/Editor/SideChannelTests.cs index 5f7f7a2fb7..a1ea5ebbab 100644 --- a/com.unity.ml-agents/Tests/Editor/SideChannelTests.cs +++ b/com.unity.ml-agents/Tests/Editor/SideChannelTests.cs @@ -90,31 +90,31 @@ public void TestFloatPropertiesSideChannel() var dictSender = new Dictionary { { propB.ChannelId, propB } }; propA.RegisterCallback(k1, f => { wasCalled++; }); - var tmp = propB.GetPropertyWithDefault(k2, 3.0f); + var tmp = propB.GetWithDefault(k2, 3.0f); Assert.AreEqual(tmp, 3.0f); - propB.SetProperty(k2, 1.0f); - tmp = propB.GetPropertyWithDefault(k2, 3.0f); + propB.Set(k2, 1.0f); + tmp = propB.GetWithDefault(k2, 3.0f); Assert.AreEqual(tmp, 1.0f); byte[] fakeData = SideChannelsManager.GetSideChannelMessage(dictSender); SideChannelsManager.ProcessSideChannelData(dictReceiver, fakeData); - tmp = propA.GetPropertyWithDefault(k2, 3.0f); + tmp = propA.GetWithDefault(k2, 3.0f); Assert.AreEqual(tmp, 1.0f); Assert.AreEqual(wasCalled, 0); - propB.SetProperty(k1, 1.0f); + propB.Set(k1, 1.0f); Assert.AreEqual(wasCalled, 0); fakeData = SideChannelsManager.GetSideChannelMessage(dictSender); SideChannelsManager.ProcessSideChannelData(dictReceiver, fakeData); Assert.AreEqual(wasCalled, 1); - var keysA = propA.ListProperties(); + var keysA = propA.List(); Assert.AreEqual(2, keysA.Count); Assert.IsTrue(keysA.Contains(k1)); Assert.IsTrue(keysA.Contains(k2)); - var keysB = propA.ListProperties(); + var keysB = propA.List(); Assert.AreEqual(2, keysB.Count); Assert.IsTrue(keysB.Contains(k1)); Assert.IsTrue(keysB.Contains(k2)); diff --git a/docs/Migrating.md b/docs/Migrating.md index beed9659bc..92dc603d17 100644 --- a/docs/Migrating.md +++ b/docs/Migrating.md @@ -33,11 +33,20 @@ double-check that the versions are in the same. The versions can be found in - The signature of `Agent.Heuristic()` was changed to take a `float[]` as a parameter, instead of returning the array. This was done to prevent a common source of error where users would return arrays of the wrong size. -- The SideChannel API has changed: - - `EnvironmentParameters` replaces the default `FloatPropertiesChannel`. You can access the `EnvironmentParameters` with `Academy.Instance.EnvironmentParameters` - - `SideChannelUtils` was renamed `SideChannelManager` +- The SideChannel API has changed (#3833, #3660) : + - Introduced the `SideChannelManager` to register, unregister and access side + channels. + - `EnvironmentParameters` replaces the default `FloatProperties`. + You can access the `EnvironmentParameters` with + `Academy.Instance.EnvironmentParameters` on C# and create an + `EnvironmentParametersChannel` on Python + - `SideChannel.OnMessageReceived` is now a protected method (was public) - The `Academy` instance now has a `StatsRecorder` property - - `SideChannelManager.GetSideChannel(s)` has been removed from the API + - SideChannel IncomingMessages methods now take an optional default argument, + which is used when trying to read more data than the message contains. + - Added a feature to allow sending stats from C# environments to TensorBoard + (and other python StatsWriters). To do this from your code, use + `Academy.Instance.StatsRecorder.Add(key, value)`(#3660) ### Steps to Migrate @@ -47,22 +56,14 @@ double-check that the versions are in the same. The versions can be found in - To force-overwrite files from a pre-existing run, add the `--force` command-line flag. - The Jupyter notebooks have been removed from the repository. -- `Academy.FloatProperties` was removed. -- `Academy.RegisterSideChannel` and `Academy.UnregisterSideChannel` were - removed. -- Replace `Academy.FloatProperties` with - `SideChannelUtils.GetSideChannel()`. -- Replace `Academy.RegisterSideChannel` with - `SideChannelUtils.RegisterSideChannel()`. -- Replace `Academy.UnregisterSideChannel` with - `SideChannelUtils.UnregisterSideChannel`. - If your Agent class overrides `Heuristic()`, change the signature to `public override void Heuristic(float[] actionsOut)` and assign values to `actionsOut` instead of returning an array. - If you used `SideChannels` you must: - - Replace `SideChannelUtils` with `SideChannelManager` - - Replace `SideChannelUtils.GetSideChannel()` with `Academy.Instance.EnvironmentParameters` - - Replace `SideChannelUtils.GetSideChannel()` with `Academy.Instance.StatsRecorder` + - Replace `Academy.FloatProperties` with `Academy.Instance.EnvironmentParameters`. + - `Academy.RegisterSideChannel` and `Academy.UnregisterSideChannel` were + removed. Use `SideChannelManager.RegisterSideChannel` and + `SideChannelManager.UnregisterSideChannel` instead. ## Migrating from 0.14 to 0.15 diff --git a/ml-agents-envs/mlagents_envs/environment.py b/ml-agents-envs/mlagents_envs/environment.py index 178ebe1eb6..b0f05aa113 100644 --- a/ml-agents-envs/mlagents_envs/environment.py +++ b/ml-agents-envs/mlagents_envs/environment.py @@ -58,7 +58,7 @@ class UnityEnvironment(BaseEnv): # Currently we require strict equality between the communication protocol # on each side, although we may allow some flexibility in the future. # This should be incremented whenever a change is made to the communication protocol. - API_VERSION = "0.16.0" + API_VERSION = "0.17.0" # Default port that the editor listens on. If an environment executable # isn't specified, this port will be used. From 723a1e8844d418ae9a7bc40954dbcae5875eb60b Mon Sep 17 00:00:00 2001 From: Vincent-Pierre BERGES Date: Thu, 23 Apr 2020 14:30:45 -0700 Subject: [PATCH 3/5] Update docs/Python-API.md Co-Authored-By: Chris Elion --- docs/Python-API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Python-API.md b/docs/Python-API.md index 98ab82e291..86da5c6dde 100644 --- a/docs/Python-API.md +++ b/docs/Python-API.md @@ -333,7 +333,7 @@ Once a property has been modified in Python, you can access it in C# after the n ```csharp var envParameters = Academy.Instance.EnvironmentParameters; -float property1 = envParameters.GetPropertyWithDefault("parameter_1", 0.0f); +float property1 = envParameters.GetWithDefault("parameter_1", 0.0f); ``` #### Custom side channels From 87ee7a0021e6875897cc57fbe09c3fc0ea9c8584 Mon Sep 17 00:00:00 2001 From: Vincent-Pierre BERGES Date: Thu, 23 Apr 2020 14:31:25 -0700 Subject: [PATCH 4/5] Update com.unity.ml-agents/CHANGELOG.md Co-Authored-By: Chris Elion --- com.unity.ml-agents/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 02473c4d03..333936c6ae 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -42,7 +42,6 @@ and this project adheres to `Academy.Instance.EnvironmentParameters` on C# and create an `EnvironmentParametersChannel` on Python - `SideChannel.OnMessageReceived` is now a protected method (was public) - - The `Academy` instance now has a `StatsRecorder` property - SideChannel IncomingMessages methods now take an optional default argument, which is used when trying to read more data than the message contains. - Added a feature to allow sending stats from C# environments to TensorBoard From d8d3bd4e2b571c0fc6930fbcdd47fb322de4554d Mon Sep 17 00:00:00 2001 From: vincentpierre Date: Thu, 23 Apr 2020 14:32:23 -0700 Subject: [PATCH 5/5] Removing unecessary migrating line --- docs/Migrating.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/Migrating.md b/docs/Migrating.md index 92dc603d17..b8c6b357ae 100644 --- a/docs/Migrating.md +++ b/docs/Migrating.md @@ -41,7 +41,6 @@ double-check that the versions are in the same. The versions can be found in `Academy.Instance.EnvironmentParameters` on C# and create an `EnvironmentParametersChannel` on Python - `SideChannel.OnMessageReceived` is now a protected method (was public) - - The `Academy` instance now has a `StatsRecorder` property - SideChannel IncomingMessages methods now take an optional default argument, which is used when trying to read more data than the message contains. - Added a feature to allow sending stats from C# environments to TensorBoard