Getting Started
Contents
Getting Started#
Quickstart colab notebook#
If you prefer to test the basic functionality of robomimic without installing anything locally, try the quickstart Colab notebook.
Running experiments#
We begin with a quick tutorial on downloading datasets and running experiments.
Before beginning, make sure you are at the base repo path:
$ cd {/path/to/robomimic}
Step 1: Download dataset#
Download the robosuite Lift (PH) dataset (see this link for more information on this dataset):
$ python robomimic/scripts/download_datasets.py --tasks lift --dataset_types ph
The dataset can be found at datasets/lift/ph/low_dim_v141.hdf5
Step 2: Launch experiment#
Now, we will run an experiment using train.py
. In this case we would like to run behavior cloning (BC) for the lift dataset we just downloaded.
$ python robomimic/scripts/train.py --config robomimic/exps/templates/bc.json --dataset datasets/lift/ph/low_dim_v141.hdf5 --debug
Running quick sanity check experiments
Make sure to add the --debug
flag to your experiments as a sanity check that your implementation works.
Resume functionality: If your training job fails due to any reason, you can re-launch your job with the additional --resume
flag to resume training from the last saved epoch. This will resume training from the last.pth
checkpoint in your output directory for the most recent training run. Some points to note:
While fine-tuning from a specified checkpoint (in
config.experiment.ckpt_path
) would load model weights from the checkpoint, resume functionality also loads the optimizer state.config.experiment.ckpt_path
will be ignored if you are resuming a training job, i.e.last.pth
will take precedence if--resume
is passed.
Warning!
This example requires robosuite to be installed (under the v1.5.1
branch), but it can be run without robosuite by disabling rollouts in robomimic/exps/templates/bc.json
: simply change the experiment.rollout.enabled
flag to false
.
Step 3: View experiment results#
After the script finishes, we can check the training outputs in the directory bc_trained_models/test
.
Experiment outputs comprise the following:
config.json # config used for this experiment
logs/ # experiment log files
log.txt # terminal output
tb/ # tensorboard logs
videos/ # videos of robot rollouts during training
models/ # saved model checkpoints
The experiment results can be viewed using tensorboard:
$ tensorboard --logdir bc_trained_models/test --bind_all
Next steps#
Please refer to the remaining documentation sections. Some helpful suggestions on pages to view next: