Skip to content

Commit 18e98fd

Browse files
author
Chris Elion
authored
fix trailing whitespace in markdown (#2786)
1 parent 16d1092 commit 18e98fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+484
-481
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ repos:
4545
.*_pb2_grpc.py
4646
)$
4747
additional_dependencies: [flake8-comprehensions]
48+
- id: trailing-whitespace
49+
name: trailing-whitespace-markdown
50+
types: [markdown]
4851

4952
- repo: https://github.com/pre-commit/pygrep-hooks
5053
rev: v1.4.1 # Use the ref you want to point at

SURVEY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unity ML-Agents Toolkit Survey
22

3-
Your opinion matters a great deal to us. Only by hearing your thoughts on the Unity ML-Agents Toolkit can we continue to improve and grow. Please take a few minutes to let us know about it.
3+
Your opinion matters a great deal to us. Only by hearing your thoughts on the Unity ML-Agents Toolkit can we continue to improve and grow. Please take a few minutes to let us know about it.
44

5-
[Fill out the survey](https://goo.gl/forms/qFMYSYr5TlINvG6f1)
5+
[Fill out the survey](https://goo.gl/forms/qFMYSYr5TlINvG6f1)

UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Tan
249249
Tanh
250250
```
251251

252-
P.S. some of these operations are under limited support and not all configurations are properly supported
252+
P.S. some of these operations are under limited support and not all configurations are properly supported
253253

254254
P.P.S. Python 3.5 or 3.6 is recommended
255255

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Barracuda cross-platform Neural Net engine copyright © 2018 Unity Technologies ApS
22

3-
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
3+
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
44

55
Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.
66

UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/ReleaseNotes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
- TF importer: made detection of actual output node from LSTM/GRU pattern more bullet proof by skipping Const nodes.
3030
- TF importer: improved InstanceNormalization handling.
3131
- TF importer: fixed SquareDifference pattern.
32-
- TF importer: fixed Conv2DBackpropInput (transpose convolution) import.
32+
- TF importer: fixed Conv2DBackpropInput (transpose convolution) import.
3333
- Fixed Conv2D performance regression on some GPUs.
3434
- Fixed TextureAsTensorData.Download() to work properly with InterpretDepthAs.Channels.
3535
- Fixed bug when identity/nop layers would reuse input as an output and later causing premature release of that tensor as part of intermediate data cleanup.
3636
- Added scale + bias to TenstorToRenderTexture interface, usefull for adjusting network output scale + bias on the fly.
3737
- Fixed double Dispose issue when worker gets garbage collected.
3838

3939
## 0.2.0
40-
- Version bumped to 0.2.0 as it brings breaking API changes, for details look below.
40+
- Version bumped to 0.2.0 as it brings breaking API changes, for details look below.
4141
- Significantly reduced temporary memory allocations by introducing internal allocator support. Now memory is re-used between layer execution as much as possible.
4242
- Improved small workload performance on CSharp backend
4343
- Added parallel implementation for multiple activation functions on CSharp backend
@@ -47,7 +47,7 @@
4747
- Added `Summary()` method to `Worker`. Currently returns allocator information.
4848
- Tabs to spaces! Aiming at higher salary (https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/).
4949
- Renamed worker type enum members: `CSharp` -> `CSharpRef`, `CSharpFast` -> `CSharp`, `Compute` -> `ComputeRef`, `ComputeFast` -> `Compute`.
50-
- Implemented new optimized `ComputePrecompiled` worker. This worker caches Compute kernels and state beforehand to reduce CPU overhead.
50+
- Implemented new optimized `ComputePrecompiled` worker. This worker caches Compute kernels and state beforehand to reduce CPU overhead.
5151
- Added `ExecuteAsync()` to `IWorker` interface, it returns `IEnumerator`, which enables you to control how many layers to schedule per frame (one iteration == one layer).
5252
- Added `Log` op support on Compute workers.
5353
- Optimized activation functions and ScaleBias by accessing tensor as continuous array. Gained ~2.0ms on 4 batch MobileNet (MBP2016).
@@ -123,8 +123,8 @@
123123
- Fixed compilation issues on Xbox One.
124124
- TexConv2D support was temporary disabled.
125125
- Barracuda logging now can be configured via static fields of ``Barracuda.D`` class, it allows both disable specific logging levels or just disable stack trace collection (helps with performance when profiling).
126-
- Compute Concat implementation now will fall back to C# implementation instead of throwing exception when unsupported configuration is encountered.
127-
- Fixed several ``ComputeBuffer`` release issues.
126+
- Compute Concat implementation now will fall back to C# implementation instead of throwing exception when unsupported configuration is encountered.
127+
- Fixed several ``ComputeBuffer`` release issues.
128128
- Added constructor for ``Tensor`` that allows to pass in data array.
129129
- Improved Flatten handling in TensorFlow models.
130130
- Added helper func ``ModelLoader.LoadFromStreamingAssets``.

UnitySDK/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unity ML-Agents SDK
22

3-
Contains the ML-Agents Unity Project, including
4-
both the core plugin (in `Scripts`), as well as a set
3+
Contains the ML-Agents Unity Project, including
4+
both the core plugin (in `Scripts`), as well as a set
55
of example environments (in `Examples`).

docs/Basic-Guide.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the basic concepts of Unity.
1111
## Setting up the ML-Agents Toolkit within Unity
1212

1313
In order to use the ML-Agents toolkit within Unity, you first need to change a few
14-
Unity settings.
14+
Unity settings.
1515

1616
1. Launch Unity
1717
2. On the Projects dialog, choose the **Open** option at the top of the window.
@@ -27,28 +27,28 @@ Unity settings.
2727

2828
## Running a Pre-trained Model
2929

30-
We include pre-trained models for our agents (`.nn` files) and we use the
31-
[Unity Inference Engine](Unity-Inference-Engine.md) to run these models
32-
inside Unity. In this section, we will use the pre-trained model for the
30+
We include pre-trained models for our agents (`.nn` files) and we use the
31+
[Unity Inference Engine](Unity-Inference-Engine.md) to run these models
32+
inside Unity. In this section, we will use the pre-trained model for the
3333
3D Ball example.
3434

3535
1. In the **Project** window, go to the `Assets/ML-Agents/Examples/3DBall/Scenes` folder
3636
and open the `3DBall` scene file.
37-
2. In the **Project** window, go to the `Assets/ML-Agents/Examples/3DBall/Prefabs` folder.
37+
2. In the **Project** window, go to the `Assets/ML-Agents/Examples/3DBall/Prefabs` folder.
3838
Expand `3DBall` and click on the `Agent` prefab. You should see the `Agent` prefab in the **Inspector** window.
39-
39+
4040
**Note**: The platforms in the `3DBall` scene were created using the `3DBall` prefab. Instead of updating all 12 platforms individually, you can update the `3DBall` prefab instead.
41-
41+
4242
![Platform Prefab](images/platform_prefab.png)
43-
44-
3. In the **Project** window, drag the **3DBallLearning** Model located in
43+
44+
3. In the **Project** window, drag the **3DBallLearning** Model located in
4545
`Assets/ML-Agents/Examples/3DBall/TFModels` into the `Model` property under `Ball 3D Agent (Script)` component in the **Inspector** window.
46-
46+
4747
![3dball learning brain](images/3dball_learning_brain.png)
48-
49-
4. You should notice that each `Agent` under each `3DBall` in the **Hierarchy** windows now contains **3DBallLearning** as `Model`. __Note__ : You can modify multiple game objects in a scene by selecting them all at
50-
once using the search bar in the Scene Hierarchy.
51-
8. Select the **InferenceDevice** to use for this model (CPU or GPU) on the Agent.
48+
49+
4. You should notice that each `Agent` under each `3DBall` in the **Hierarchy** windows now contains **3DBallLearning** as `Model`. __Note__ : You can modify multiple game objects in a scene by selecting them all at
50+
once using the search bar in the Scene Hierarchy.
51+
8. Select the **InferenceDevice** to use for this model (CPU or GPU) on the Agent.
5252
_Note: CPU is faster for the majority of ML-Agents toolkit generated models_
5353
9. Click the **Play** button and you will see the platforms balance the balls
5454
using the pre-trained model.
@@ -71,13 +71,13 @@ More information and documentation is provided in the
7171

7272
### Setting up the environment for training
7373

74-
In order to setup the Agents for Training, you will need to edit the
74+
In order to setup the Agents for Training, you will need to edit the
7575
`Behavior Name` under `BehaviorParamters` in the Agent Inspector window.
7676
The `Behavior Name` is used to group agents per behaviors. Note that Agents
7777
sharing the same `Behavior Name` must be agents of the same type using the
78-
same `Behavior Parameters`. You can make sure all your agents have the same
78+
same `Behavior Parameters`. You can make sure all your agents have the same
7979
`Behavior Parameters` using Prefabs.
80-
The `Behavior Name` corresponds to the name of the model that will be
80+
The `Behavior Name` corresponds to the name of the model that will be
8181
generated by the training process and is used to select the hyperparameters
8282
from the training configuration file.
8383

docs/Creating-Custom-Protobuf-Messages.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Creating Custom Protobuf Messages
55

6-
Unity and Python communicate by sending protobuf messages to and from each other. You can create custom protobuf messages if you want to exchange structured data beyond what is included by default.
6+
Unity and Python communicate by sending protobuf messages to and from each other. You can create custom protobuf messages if you want to exchange structured data beyond what is included by default.
77

88
## Implementing a Custom Message
99

@@ -17,15 +17,15 @@ There are three custom message types currently supported - Custom Actions, Custo
1717

1818
By default, the Python API sends actions to Unity in the form of a floating point list and an optional string-valued text action for each agent.
1919

20-
You can define a custom action type, to either replace or augment the default, by adding fields to the `CustomAction` message, which you can do by editing the file `protobuf-definitions/proto/mlagents/envs/communicator_objects/custom_action.proto`.
20+
You can define a custom action type, to either replace or augment the default, by adding fields to the `CustomAction` message, which you can do by editing the file `protobuf-definitions/proto/mlagents/envs/communicator_objects/custom_action.proto`.
2121

2222
Instances of custom actions are set via the `custom_action` parameter of the `env.step`. An agent receives a custom action by defining a method with the signature:
2323

2424
```csharp
2525
public virtual void AgentAction(float[] vectorAction, string textAction, CommunicatorObjects.CustomAction customAction)
2626
```
2727

28-
Below is an example of creating a custom action that instructs an agent to choose a cardinal direction to walk in and how far to walk.
28+
Below is an example of creating a custom action that instructs an agent to choose a cardinal direction to walk in and how far to walk.
2929

3030
The `custom_action.proto` file looks like:
3131

@@ -42,7 +42,7 @@ message CustomAction {
4242
EAST=2;
4343
WEST=3;
4444
}
45-
float walkAmount = 1;
45+
float walkAmount = 1;
4646
Direction direction = 2;
4747
}
4848
```
@@ -81,7 +81,7 @@ Keep in mind that the protobuffer compiler automatically configures the capitali
8181

8282
### Custom Reset Parameters
8383

84-
By default, you can configure an environment `env` in the Python API by specifying a `config` parameter that is a dictionary mapping strings to floats.
84+
By default, you can configure an environment `env` in the Python API by specifying a `config` parameter that is a dictionary mapping strings to floats.
8585

8686
You can also configure the environment reset using a custom protobuf message. To do this, add fields to the `CustomResetParameters` protobuf message in `custom_reset_parameters.proto`, analogously to `CustomAction` above. Then pass an instance of the message to `env.reset` via the `custom_reset_parameters` keyword parameter.
8787

@@ -140,9 +140,9 @@ public class MyAcademy : Academy
140140

141141
### Custom Observations
142142

143-
By default, Unity returns observations to Python in the form of a floating-point vector.
143+
By default, Unity returns observations to Python in the form of a floating-point vector.
144144

145-
You can define a custom observation message to supplement that. To do so, add fields to the `CustomObservation` protobuf message in `custom_observation.proto`.
145+
You can define a custom observation message to supplement that. To do so, add fields to the `CustomObservation` protobuf message in `custom_observation.proto`.
146146

147147
Then in your agent, create an instance of a custom observation via `new CommunicatorObjects.CustomObservation`. Then in `CollectObservations`, call `SetCustomObservation` with the custom observation instance as the parameter.
148148

@@ -156,7 +156,7 @@ class MyAgent : Agent {
156156
var obs = new CustomObservation();
157157
obs.CustomField = 1.0;
158158
SetCustomObservation(obs);
159-
}
159+
}
160160
}
161161
```
162162

docs/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ UnityAgentsException: The Communicator was unable to connect. Please make sure t
4444

4545
There may be a number of possible causes:
4646

47-
* _Cause_: There may be no agent in the scene
47+
* _Cause_: There may be no agent in the scene
4848
* _Cause_: On OSX, the firewall may be preventing communication with the
4949
environment. _Solution_: Add the built environment binary to the list of
5050
exceptions on the firewall by following

docs/Getting-Started-with-Balance-Ball.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ the 3D Balance Ball environment, the Agent components are placed on the twelve
8989
"Agent" GameObjects. The base Agent object has a few properties that affect its
9090
behavior:
9191

92-
* **Behavior Parameters** — Every Agent must have a Behavior. The Behavior
92+
* **Behavior Parameters** — Every Agent must have a Behavior. The Behavior
9393
determines how an Agent makes decisions. More on Behavior Parameters in
9494
the next section.
9595
* **Visual Observations** — Defines any Camera objects used by the Agent to
@@ -110,7 +110,7 @@ The Ball3DAgent subclass defines the following methods:
110110
training generalizes to more than a specific starting position and agent cube
111111
attitude.
112112
* agent.CollectObservations() — Called every simulation step. Responsible for
113-
collecting the Agent's observations of the environment. Since the Behavior
113+
collecting the Agent's observations of the environment. Since the Behavior
114114
Parameters of the Agent are set with vector observation
115115
space with a state size of 8, the `CollectObservations()` must call
116116
`AddVectorObs` such that vector size adds up to 8.
@@ -122,11 +122,11 @@ The Ball3DAgent subclass defines the following methods:
122122
negative reward for dropping the ball. An Agent is also marked as done when it
123123
drops the ball so that it will reset with a new ball for the next simulation
124124
step.
125-
* agent.Heuristic() - When the `Use Heuristic` checkbox is checked in the Behavior
125+
* agent.Heuristic() - When the `Use Heuristic` checkbox is checked in the Behavior
126126
Parameters of the Agent, the Agent will use the `Heuristic()` method to generate
127127
the actions of the Agent. As such, the `Heuristic()` method returns an array of
128128
floats. In the case of the Ball 3D Agent, the `Heuristic()` method converts the
129-
keyboard inputs into actions.
129+
keyboard inputs into actions.
130130

131131

132132
#### Behavior Parameters : Vector Observation Space

0 commit comments

Comments
 (0)