Skip to content

Commit

Permalink
intro tutorial: Improve layout of batch run text
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Jan 11, 2024
1 parent 59818a0 commit 424be31
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions docs/tutorials/intro_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1103,38 +1103,20 @@
"We call `batch_run` with the following arguments:\n",
"\n",
"* `model_cls`\n",
"<br/><br/>\n",
"The model class that is used for the batch run.\n",
"<br/><br/>\n",
"\n",
" The model class that is used for the batch run.\n",
"* `parameters`\n",
"<br/><br/>\n",
"A dictionary containing all the parameters of the model class and desired values to use for the batch run as key-value pairs. Each value can either be fixed ( e.g. `{\"height\": 10, \"width\": 10}`) or an iterable (e.g. `{\"N\": range(10, 500, 10)}`). `batch_run` will then generate all possible parameter combinations based on this dictionary and run the model `iterations` times for each combination.\n",
"<br/><br/>\n",
"\n",
" A dictionary containing all the parameters of the model class and desired values to use for the batch run as key-value pairs. Each value can either be fixed ( e.g. `{\"height\": 10, \"width\": 10}`) or an iterable (e.g. `{\"N\": range(10, 500, 10)}`). `batch_run` will then generate all possible parameter combinations based on this dictionary and run the model `iterations` times for each combination.\n",
"* `number_processes`\n",
"<br/><br/>\n",
"If not specified, defaults to 1. Set it to `None` to use all the available processors.\n",
"<br/><br/>\n",
"Note: Multiprocessing does make debugging challenging. If your parameter sweeps are resulting in unexpected errors set `number_processes = 1`.\n",
"<br/><br/>\n",
"\n",
" If not specified, defaults to 1. Set it to `None` to use all the available processors.\n",
" Note: Multiprocessing does make debugging challenging. If your parameter sweeps are resulting in unexpected errors set `number_processes=1`.\n",
"* `iterations`\n",
"<br/><br/>\n",
"The number of iterations to run each parameter combination for. Optional. If not specified, defaults to 1.<br/><br/>\n",
" The number of iterations to run each parameter combination for. Optional. If not specified, defaults to 1.\n",
"* `data_collection_period`\n",
"<br/><br/>\n",
"The length of the period (number of steps) after which the model and agent reporters collect data. Optional. If not specified, defaults to -1, i.e. only at the end of each episode.\n",
"<br/><br/>\n",
"\n",
" The length of the period (number of steps) after which the model and agent reporters collect data. Optional. If not specified, defaults to -1, i.e. only at the end of each episode.\n",
"* `max_steps`\n",
"<br/><br/>\n",
"The maximum number of time steps after which the model halts. An episode does either end when `self.running` of the model class is set to `False` or when `model.schedule.steps == max_steps` is reached. Optional. If not specified, defaults to 1000.\n",
"<br/><br/>\n",
"\n",
" The maximum number of time steps after which the model halts. An episode does either end when `self.running` of the model class is set to `False` or when `model.schedule.steps == max_steps` is reached. Optional. If not specified, defaults to 1000.\n",
"* `display_progress`\n",
"<br/><br/>\n",
"Display the batch run progress. Optional. If not specified, defaults to `True`."
" Display the batch run progress. Optional. If not specified, defaults to `True`."
]
},
{
Expand All @@ -1145,10 +1127,10 @@
"\n",
"We want to keep track of\n",
"\n",
"1. the Gini coefficient value and\n",
"2. the individual agent's wealth development.\n",
"1. the Gini coefficient value at each time step, and\n",
"2. the individual agent's wealth development and steps without giving money.\n",
"\n",
"Since for the latter changes at each time step might be interesting, we set `data_collection_period = 1`.\n",
"**Important:** Since for the latter changes at each time step might be interesting, we set `data_collection_period=1`. By default, it only collects data at the end of each episode.\n",
"\n",
"Note: The total number of runs is 245 (= 49 different populations * 5 iterations per population). However, the resulting list of dictionaries will be of length 6186250 (= 250 average agents per population * 49 different populations * 5 iterations per population * 101 steps per iteration). "
]
Expand Down

0 comments on commit 424be31

Please sign in to comment.