Skip to content

Conversation

vincentpierre
Copy link
Contributor

Proposed change(s)

Update to the documentation for #3807

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@vincentpierre vincentpierre self-assigned this Apr 23, 2020
- 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to emphasize that the StatsSideChannel is now internal and that this is the new way

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also mention that EngineConfigurationChannel is now internal?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth mentioning that OnMessageReceived is now internal?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StatsSideChannel hasn't actually been released yet, so we should just edit the existing line for it.

@@ -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:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to mention the user-facing changes of going from StatsSideChannel to Academy.Instance.StatsRecorder

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that StatsSideChannel is now internal

@@ -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:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add that EngineConfigurationChannel is no internal

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth mentioning that OnMessageReceived is now internal?

- `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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also UnregisterAllSideChannels

- `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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same - SideChannelManager/Utils wasn't in 0.15, so we don't need to mention it here.

@@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revise the "Replace Academy.FloatProperties..." lines above instead.

Copy link
Contributor

@chriselion chriselion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments - the changelog and migration need to be revised, considering there's already SideChannel mentions for this release.

Co-Authored-By: Chris Elion <[email protected]>
Copy link
Contributor

@chriselion chriselion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@vincentpierre vincentpierre merged commit be42950 into develop-mm-env-params-unity Apr 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-mm-env-params-unity-docs branch April 23, 2020 21:33
vincentpierre added a commit that referenced this pull request Apr 23, 2020
* Make EnvironmentParameters a first-class citizen in the API

Missing: Python conterparts and testing.

* Minor comment fix to Engine Parameters

* A second minor fix.

* Make EngineConfigChannel Internal and add a singleton/sealed accessor

* Make StatsSideChannel Internal and add a singleton/sealed accessor

* Changes to SideChannelUtils

- Disallow two sidechannels of the same type to be added
- Remove GetSideChannels that return a list as that is now unnecessary
- Make most methods except (register/unregister) internal to limit users impacting the “system-level” side channels
- Add an improved comment to SideChannel.cs

* Added Dispose methods to system-level sidechannel wrappers

- Specifically to StatsRecorder, EnvironmentParameters and EngineParameters.
- Updated Academy.Dispose to take advantage of these.
- Updated Editor tests to cover all three “system-level” side channels.

Kudos to Unit Tests (TestAcademy / TestAcademyDispose) for catching these.

* Removed debub log.

* Back-up commit.

* Revert "Back-up commit."

This reverts commit f81e835.

* key changes to wrapper classes

made the wrapper classes non-singleton (but internal constructors)
made EngineParameters internal

* Re-enabled the option to add multiple side channels of the same type

* Fixed example env

* Add an enum flag to the EnvParamsChannel

* Adding .cs.meta files

* Update engine config side channel

Removed unnecessary accessors
Made capture frame rate a parameter

* Rename SideChannelUtils —> SideChannelsManager

* PR feedback

* Minor PR feedback.

* Python side changes to the SideChannel redesign (#3826)

* Modified the EngineConfig to send one message per field

* Created the Python Environment Parameters Channel and hooked it in

* Make OnMessageReceived protected

* addressing comments

* [Side Channels] Edited the documenation and renamed a few things (#3833)

* Edited the documetation and renamed a few things

* addressing comments

* Update docs/Python-API.md

Co-Authored-By: Chris Elion <[email protected]>

* Update com.unity.ml-agents/CHANGELOG.md

Co-Authored-By: Chris Elion <[email protected]>

* Removing unecessary migrating line

Co-authored-by: Chris Elion <[email protected]>

* Addressing renaming comments

* Removing the EngineParameters class

Co-authored-by: Vincent-Pierre BERGES <[email protected]>
Co-authored-by: Chris Elion <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants