Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.84 KB

File metadata and controls

47 lines (31 loc) · 1.84 KB

Running your models

We have run.sh file present with default to suit begineers and common usecases. But in case you are looking for more, like custom checkpoint for rollout, episodes count, etc, this document will help you.

⚠️ Warning: `run.sh` is the entrypoint for evaluations when running on AIcrowd, so remember your changes will get executed during evaluations phase too.

Training phase

To run without run.sh wrapper, you can use following command.

python ./train.py -f experiments/procgen-starter-example.yaml

We have documented different parameters you can tweek in procgen-starter-exmaple.yaml. In case you want to read further about them, check out RLlib Documentation.

RLlib have many algorithms implemented out of box, which you can use by tweeking parameters of your experiment file. The list of supported algorithms and their corresponding variable is available here.

Rollout phase

run.sh wrapper automatically finds latest checkpoint for your experiment, and executes rollout with 5 episodes. You can modify its behaviour by playing with environment variables:

CHECKPOINT: (for rollout) path to checkpoint directory, tries to detect automatically otherwise, assumes data present at ~/ray_results.
EPISODES: (for rollout) number of episodes, default: 5

Example:

EPISODES=100 run.sh --rollout

OR you can use rollout.py directly

python ./rollout.py \
    ~/ray_results/procgen-ppo/<auto-generated-folder-name>/checkpoint_1/checkpoint-1 \
    --episodes 100

The path to the checkpoint will have the following path in case of default options ~/ray_results/procgen-ppo/<experiment-name>-<uuid>/checkpoint_1/checkpoint-1, you can find and pass the checkpoint accordingly.