Rollouts

Generating rollouts

To generate rollouts for any of the registered environments run:

$ python -m sdriving.scripts.rollout --help

The configurable parameters are listed below:

usage: rollout.py [-h] -s SAVE_DIR [-m MODEL_SAVE_PATH]
                  [-tep NUM_TEST_EPISODES] --env ENV [--env-kwargs ENV_KWARGS]
                  [--model-type {one_step,two_step,None}] [--no-render] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -s SAVE_DIR, --save-dir SAVE_DIR
  -m MODEL_SAVE_PATH, --model-save-path MODEL_SAVE_PATH
  -tep NUM_TEST_EPISODES, --num-test-episodes NUM_TEST_EPISODES
  --env ENV
  --env-kwargs ENV_KWARGS
  --model-type {one_step,two_step,None}
  --no-render
  -v, --verbose

To test the proper functioning of an environment a good check is to generate a rollout for the same without passing any pretrained model. This will simulate the environment by sampling random actions from the action space. Even though this is not an exhaustive test and the training can still fail, it ensures that the pipeline for sampling environment observations and the episode rollout strategy used in the trainer works properly.

Last updated