Skip to content

Commit 6ff6575

Browse files
shihzyErvin T.
andauthored
Updated training.md to include note about CLI arguments in the YAML file (#4630)
* Update Training-ML-Agents.md * Update docs/Training-ML-Agents.md Co-authored-by: Ervin T. <[email protected]> * removed trailing whitespace Co-authored-by: Ervin T. <[email protected]>
1 parent 1c4f1e1 commit 6ff6575

File tree

1 file changed

+52
-10
lines changed

1 file changed

+52
-10
lines changed

docs/Training-ML-Agents.md

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mlagents-learn <trainer-config-file> --env=<env_name> --run-id=<run-identifier>
5858

5959
where
6060

61-
- `<trainer-config-file>` is the file path of the trainer configuration yaml.
61+
- `<trainer-config-file>` is the file path of the trainer configuration YAML.
6262
This contains all the hyperparameter values. We offer a detailed guide on the
6363
structure of this file and the meaning of the hyperparameters (and advice on
6464
how to set them) in the dedicated
@@ -138,14 +138,6 @@ flags for `mlagents-learn` that control the training configurations:
138138
- `<trainer-config-file>`: defines the training hyperparameters for each
139139
Behavior in the scene, and the set-ups for the environment parameters
140140
(Curriculum Learning and Environment Parameter Randomization)
141-
- `--num-envs`: number of concurrent Unity instances to use during training
142-
143-
Reminder that a detailed description of all command-line options can be found by
144-
using the help utility:
145-
146-
```sh
147-
mlagents-learn --help
148-
```
149141

150142
It is important to highlight that successfully training a Behavior in the
151143
ML-Agents Toolkit involves tuning the training hyperparameters and
@@ -172,7 +164,6 @@ add typically has its own training configurations. For instance:
172164
demonstrations.)
173165
- Use self-play? (Assuming your environment includes multiple agents.)
174166

175-
176167
The trainer config file, `<trainer-config-file>`, determines the features you will
177168
use during training, and the answers to the above questions will dictate its contents.
178169
The rest of this guide breaks down the different sub-sections of the trainer config file
@@ -185,6 +176,57 @@ an old set of configuration files (trainer config, curriculum, and sampler files
185176
format, a script has been provided. Run `python -m mlagents.trainers.upgrade_config -h` in your
186177
console to see the script's usage.
187178

179+
### Adding CLI Arguments to the Training Configuration file
180+
181+
Additionally, within the training configuration YAML file, you can also add the
182+
CLI arguments (such as `--num-envs`).
183+
184+
Reminder that a detailed description of all the CLI arguments can be found by
185+
using the help utility:
186+
187+
```sh
188+
mlagents-learn --help
189+
```
190+
191+
These additional CLI arguments are grouped into environment, engine and checkpoint. The available settings and example values are shown below.
192+
193+
#### Environment settings
194+
195+
```yaml
196+
env_settings:
197+
env_path: FoodCollector
198+
env_args: null
199+
base_port: 5005
200+
num_envs: 1
201+
seed: -1
202+
```
203+
204+
#### Engine settings
205+
206+
```yaml
207+
engine_settings:
208+
width: 84
209+
height: 84
210+
quality_level: 5
211+
time_scale: 20
212+
target_frame_rate: -1
213+
capture_frame_rate: 60
214+
no_graphics: false
215+
```
216+
217+
#### Checkpoint settings
218+
219+
```yaml
220+
checkpoint_settings:
221+
run_id: foodtorch
222+
initialize_from: null
223+
load_model: false
224+
resume: false
225+
force: true
226+
train_model: false
227+
inference: false
228+
```
229+
188230
### Behavior Configurations
189231
190232
The primary section of the trainer config file is a

0 commit comments

Comments
 (0)