Docs changes for the Side Channels feature#3011
Conversation
| '--run-id': 'first-run', | ||
| '--save-freq': '50000', | ||
| '--seed': '-1', | ||
| '--slow': False, |
There was a problem hiding this comment.
Actually, none of this is accurate anymore. It looks like
INFO:mlagents.trainers:CommandLineOptions(debug=False, num_runs=1, seed=-1, env_path=None, run_id='first-run', load_model=False, train_model=True, save_freq=50000, keep_checkpoints=5, base_port=5005, num_envs=1, curriculum_folder=None, lesson=0, slow=False, no_graphics=False, multi_gpu=False, trainer_config_path='config/trainer_config.yaml', sampler_file_path=None, docker_target_name=None, env_args=None, cpu=False)
INFO:mlagents.envs:Start training by pressing the Play button in the Unity Editor.
today, Maybe just delete this part?
There was a problem hiding this comment.
I agree to delete it. It does not add anything.
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
…Technologies/ml-agents into develop-side-channel-docs
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
| * `CustomResetParameters` are now removed. | ||
| * `reset()` on the Low-Level Python API no longer takes a `train_mode` argument. To modify the performance/speed of the engine, you must use an `EngineConfigurationChannel` | ||
| * `reset()` on the Low-Level Python API no longer takes a `config` argument. `UnityEnvironment` no longer has a `reset_parameters` field. To modify float properties in the environment, you must use a `FloatPropertiesChannel` | ||
| * The Academy no longer has a `Training Configuration` nor `Inference Configuration` field in the inspector. To modify the configuration form the Low-Level Python API, use an `EngineConfigurationChannel`. To modify it during training, use the new command line arguments `--width`, `--heigth`, `--quality-level`, `--time-scale` and `--target-frame-rate` in `mlagents-learn`. |
There was a problem hiding this comment.
Maybe something like "These default to the previous default values of the Training Configuration fields. If you weren't using --slow, you don't need to change anything. If you were running training with --slow, you should now pass --quality-level=... etc" (it might be better in a "Steps to Migrate" section" with slightly different wording)
There was a problem hiding this comment.
I added :
Steps to Migrate
- If you had a custom
Training Configurationin the Academy inspector, you will need to pass your custom configuration at every training run using the new command line arguments--width,--heigth,--quality-level,--time-scaleand--target-frame-rate. - If you were using
--slowinmlagents-learn, you will need to pass your oldInference Configurationof the Academy inspector with the new command line arguments--width,--heigth,--quality-level,--time-scaleand--target-frame-rateinstead.
chriselion
left a comment
There was a problem hiding this comment.
One minor comment on the migration guide, looks good otherwise.
| * `CustomResetParameters` are now removed. | ||
| * `reset()` on the Low-Level Python API no longer takes a `train_mode` argument. To modify the performance/speed of the engine, you must use an `EngineConfigurationChannel` | ||
| * `reset()` on the Low-Level Python API no longer takes a `config` argument. `UnityEnvironment` no longer has a `reset_parameters` field. To modify float properties in the environment, you must use a `FloatPropertiesChannel` | ||
| * The Academy no longer has a `Training Configuration` nor `Inference Configuration` field in the inspector. To modify the configuration form the Low-Level Python API, use an `EngineConfigurationChannel`. To modify it during training, use the new command line arguments `--width`, `--heigth`, `--quality-level`, `--time-scale` and `--target-frame-rate` in `mlagents-learn`. |
There was a problem hiding this comment.
Spelling on --height
Also isn't this waaay too many options to do command line? I'd assume for most things you'd want to change all of them.
There was a problem hiding this comment.
For us, the defaults are pretty standard. Width and height are not really useful. Quality settings do not make a huge difference and can be left at default value. Target frame rate of -1 is default and should not change. The only one that really changes is time scale
Good catch on the typo
There was a problem hiding this comment.
Sounds good. So in training we'd just have them pass --time-scale=whatevertheywant. This is actually pretty nice, rather than baking it into the game.
| ### Important changes | ||
| * `CustomResetParameters` are now removed. | ||
| * `reset()` on the Low-Level Python API no longer takes a `train_mode` argument. To modify the performance/speed of the engine, you must use an `EngineConfigurationChannel` | ||
| * `reset()` on the Low-Level Python API no longer takes a `config` argument. `UnityEnvironment` no longer has a `reset_parameters` field. To modify float properties in the environment, you must use a `FloatPropertiesChannel` |
There was a problem hiding this comment.
Would link to the Python API page here
| __Note__ : A side channel will only send/receive messages when `env.step` is | ||
| called. | ||
|
|
||
| #### EngineConfigurationChannel |
There was a problem hiding this comment.
Would add a two-line example for creating each of these, and how to pass the list into the UnityEnvironment. Unless that's somewhere else in the docs?
|
|
||
| To enable variations in the environments, we implemented `Reset Parameters`. We | ||
| To enable variations in the environments, we implemented `Reset Parameters`. | ||
| `ResetParameters` are `Academy.FloatProperties` that are used only when |
There was a problem hiding this comment.
Space in Reset Parameters.
So what differentiates these two is that FloatProperties could (technically) be used anytime but our example envs only use them at reset right? The phrasing is a bit confusing but I think that makes sense.
| To enable variations in the environments, we implemented `Reset Parameters`. | ||
| `ResetParameters` are `Academy.FloatProperties` that are used only when | ||
| `Reset Parameters` are `Academy.FloatProperties` that are used only when | ||
| reseting the environment. We |
There was a problem hiding this comment.
Also spelling on the word reseting -> resetting
ervteng
left a comment
There was a problem hiding this comment.
had one last spelling comment but other than that LGTM
* [WIP] Side Channel initial layout * Working prototype for raw bytes * fixing format mistake * Added some errors and some unit tests in C# * Added the side channel for the Engine Configuration. (#2958) * Added the side channel for the Engine Configuration. Note that this change does not require modifying a lot of files : - Adding a sender in Python - Adding a receiver in C# - subscribe the receiver to the communicator (here is a one liner in the Academy) - Add the side channel to the Python UnityEnvironment (not represented here) Adding the side channel to the environment would look like such : ```python from mlagents.envs.environment import UnityEnvironment from mlagents.envs.side_channel.raw_bytes_channel import RawBytesChannel from mlagents.envs.side_channel.engine_configuration_channel import EngineConfigurationChannel channel0 = RawBytesChannel() channel1 = EngineConfigurationChannel() env = UnityEnvironment(base_port = 5004, side_channels = [channel0, channel1]) ``` * renamings * addressing comments * Logging a message when an unknown side channel number has been received by Unity * Addressing comments * renamings * renamings * Adding FloatProperties to the side channels (#2968) * renaming m_SideChannelsDict to m_SideChannel * renaming and some comments * renaming and adding a GetAndClearReceivedMessages() in the RawBytesSideChannel * micro-optimization * more errors and some nit * addressing comments * Using little-endian format in Python * adding some comments * Code comments * some changes and added the unit tests on both Python and C# * removing default default in get default * Update UnitySDK/Assets/ML-Agents/Scripts/SideChannel/SideChannel.cs Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * Update ml-agents-envs/mlagents/envs/side_channel/raw_bytes_channel.py Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * addressing comments * fixing tests * removing the arguments to reset and the property reset_parameters on the UnityEnvironment * curriculum works but removed the check for reset parameters in the scene * processing side channels before the reset command * Removing engine configuration from C# * Engine configuration removed * fixing the tests * Update ml-agents-envs/mlagents/envs/subprocess_env_manager.py Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * Removing register callbacks with empty calls in FloarProperties * Clamp instead of min max * removing the brain names from the environment.py print * renaming reset_parameters to get properties * made a default engine config * bug fix * Empty commit * Docs changes for the Side Channels feature (#3011) * Docs changes for the Side Channels feature * replace deprecated with removed on the CustomResetPratmeters` * Update docs/Python-API.md Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * Update docs/Training-Generalized-Reinforcement-Learning-Agents.md Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * Removing the console outputs in the docs * Update docs/Training-ML-Agents.md Co-Authored-By: Chris Elion <chris.elion@unity3d.com> * replace does not work with ignored * adding a note on side channels * adding some steps to migrate * addressing comments * adding more docs to the LL-API * added a blob on how to access the properties in C# * adding space between ResetParameters * fix typo * bug fixes * addressing comments
|
Heya, I was directed here from this feature request. Where exactly can I find the part that covers the tensorboard C# variable functionality? Will my input still be relevant? |
No description provided.