### Install Robosuite from Source Source: https://robomimic.github.io/docs/introduction/installation.html Clones the robosuite repository, navigates into the directory, and installs its requirements. This is recommended for running most robomimic examples and released datasets. ```bash # From source (recommended) $ cd $ git clone https://github.com/ARISE-Initiative/robosuite.git $ cd robosuite $ pip install -r requirements.txt ``` -------------------------------- ### Install Robosuite from Source Source: https://robomimic.github.io/docs/v0.2/sources/introduction/installation.md.txt Installs the robosuite simulator by cloning the repository and installing dependencies from requirements.txt. This is the recommended method for robosuite. ```sh cd git clone https://github.com/ARISE-Initiative/robosuite.git cd robosuite pip install -r requirements.txt ``` -------------------------------- ### Install Robosuite Source: https://robomimic.github.io/docs/v0.4/introduction/installation.html Installs the robosuite simulator, which is required for running most robomimic examples and datasets. Installation can be done from source or via pip. ```bash # From source (recommended) $ cd $ git clone https://github.com/ARISE-Initiative/robosuite.git $ cd robosuite $ pip install -r requirements.txt OR # Via pip $ pip install robosuite ``` -------------------------------- ### VisualCore Initialization Example Source: https://robomimic.github.io/docs/sources/modules/models.md.txt Example of initializing a VisualCore module with a ResNet18Conv backbone and SpatialSoftmax pooling. This demonstrates how to configure image input processing, backbone, pooling, and feature dimension. ```python from robomimic.models.obs_core import VisualCore from robomimic.models.base_nets import ResNet18Conv, SpatialSoftmax vis_net = VisualCore( input_shape=(3, 224, 224), core_class="ResNet18Conv", # use ResNet18 as the visualcore backbone core_kwargs={"pretrained": False, "input_coord_conv": False}, # kwargs for the ResNet18Conv class pool_class="SpatialSoftmax", # use spatial softmax to regularize the model output pool_kwargs={"num_kp": 32}, # kwargs for the SpatialSoftmax --- use 32 keypoints flatten=True, # flatten the output of the spatial softmax layer feature_dimension=64, # project the flattened feature into a 64-dim vector through a linear layer ) ``` -------------------------------- ### Install Robomimic from Source Source: https://robomimic.github.io/docs/introduction/installation.html Clones the robomimic repository, navigates into the directory, and installs it in editable mode using pip. This is the recommended installation method. ```bash $ cd $ git clone https://github.com/ARISE-Initiative/robomimic.git $ cd robomimic $ pip install -e . ``` -------------------------------- ### Install Documentation Dependencies Source: https://robomimic.github.io/docs/v0.3/sources/introduction/installation.md.txt Installs the additional requirements needed to build the documentation locally. This command should be run from the root of the repository. ```sh $ pip install -r requirements-docs.txt ``` -------------------------------- ### Base Config JSON Example Source: https://robomimic.github.io/docs/sources/tutorials/hyperparam_scan.md.txt An example of a base configuration JSON file. This file defines the initial settings for an experiment, including algorithm, experiment details, training parameters, and algorithm-specific options. ```json { "algo_name": "bc", "experiment": { "name": "bc_rnn_hyper", "validate": true, "save": { "enabled": true, "every_n_seconds": null, "every_n_epochs": 50, "epochs": [], "on_best_validation": false, "on_best_rollout_return": false, "on_best_rollout_success_rate": true }, "epoch_every_n_steps": 100, "validation_epoch_every_n_steps": 10, "rollout": { "enabled": true, "n": 50, "horizon": 400, "rate": 50, "warmstart": 0, "terminate_on_success": true } }, "train": { "data": "/tmp/test_v15.hdf5", "output_dir": "../bc_trained_models", "num_data_workers": 0, "hdf5_cache_mode": "all", "hdf5_use_swmr": true, "hdf5_normalize_obs": false, "hdf5_filter_key": null, "seq_length": 1, "goal_mode": null, "cuda": true, "batch_size": 100, "num_epochs": 2000, "seed": 1 }, "algo": { "optim_params": { "policy": { "learning_rate": { "initial": 0.0001, "decay_factor": 0.1, "epoch_schedule": [] }, "regularization": { "L2": 0.0 } } }, "actor_layer_dims": [ 1024, 1024 ], "gmm": { "enabled": false, "num_modes": 5, "min_std": 0.0001, "std_activation": "softplus", "low_noise_eval": true }, "rnn": { "enabled": false, "horizon": 10, "hidden_dim": 400, "rnn_type": "LSTM", "num_layers": 2 } } } ``` -------------------------------- ### Download RoboMimic Datasets with Python Script Source: https://robomimic.github.io/docs/v0.2/datasets/robomimic_v0.1.html Use the `download_datasets.py` script for programmatic dataset installation. This method sets up a directory structure compatible with benchmark reproduction examples. It supports filtering by task, dataset type, and HDF5 type. ```bash python download_datasets.py python download_datasets.py --tasks sim --dataset_types ph --hdf5_types low_dim --dry_run python download_datasets.py --tasks sim --dataset_types ph --hdf5_types low_dim python download_datasets.py --tasks can square --dataset_types mh --hdf5_types low_dim image python download_datasets.py --tasks all --dataset_types mg --hdf5_types low_dim_sparse python download_datasets.py --tasks real python download_datasets.py --download_dir /tmp/datasets ``` -------------------------------- ### Example: Train BC on Two Datasets Source: https://robomimic.github.io/docs/sources/tutorials/multi_dataset_training.md.txt Complete configuration example for training a BC model on two datasets with different weights and normalized sampling. ```python import robomimic from robomimic.config import config_factory # create BC config config = config_factory(algo_name="bc") # configure datasets config.train.data = [ { "path": "expert_demos.hdf5", "weight": 2.0, # sample expert demos more frequently }, { "path": "suboptimal_demos.hdf5", "weight": 1.0, } ] # normalize weights by dataset size for balanced sampling config.train.normalize_weights_by_ds_size = True # other training settings... config.train.batch_size = 100 config.train.num_epochs = 1000 ``` -------------------------------- ### Base Config JSON Example Source: https://robomimic.github.io/docs/tutorials/hyperparam_scan.html An example of a base configuration JSON file, including experiment name and dataset path. Relevant settings not involved in the scan can be omitted. ```json { "algo_name": "bc", "experiment": { "name": "bc_rnn_hyper", "validate": true, "save": { "enabled": true, "every_n_seconds": null, "every_n_epochs": 50, "epochs": [], "on_best_validation": false, "on_best_rollout_return": false, "on_best_rollout_success_rate": true }, "epoch_every_n_steps": 100, "validation_epoch_every_n_steps": 10, "rollout": { "enabled": true, "n": 50, "horizon": 400, "rate": 50, "warmstart": 0, "terminate_on_success": true } }, "train": { "data": "/tmp/test_v15.hdf5", "output_dir": "../bc_trained_models", "num_data_workers": 0, "hdf5_cache_mode": "all", "hdf5_use_swmr": true, "hdf5_normalize_obs": false, "hdf5_filter_key": null, "seq_length": 1, "goal_mode": null, "cuda": true, "batch_size": 100, "num_epochs": 2000, "seed": 1 }, "algo": { "optim_params": { "policy": { "learning_rate": { "initial": 0.0001, "decay_factor": 0.1, "epoch_schedule": [] }, "regularization": { "L2": 0.0 } } }, "actor_layer_dims": [ 1024, 1024 ], "gmm": { "enabled": false, "num_modes": 5, "min_std": 0.0001, "std_activation": "softplus", "low_noise_eval": true }, "rnn": { "enabled": false, "horizon": 10, "hidden_dim": 400, "rnn_type": "LSTM", "num_layers": 2 } } } ``` -------------------------------- ### Install Documentation Dependencies Source: https://robomimic.github.io/docs/introduction/installation.html Installs additional Python packages required for building the documentation locally. This is necessary for contributing to the repository. ```bash $ pip install -r requirements-docs.txt ``` -------------------------------- ### Base Configuration JSON Example Source: https://robomimic.github.io/docs/v0.3/tutorials/hyperparam_scan.html An example of a base configuration JSON file used for hyperparameter scans. It includes settings for the algorithm, experiment, training, and optimizer parameters. ```json { "algo_name": "bc", "experiment": { "name": "bc_rnn_hyper", "validate": true, "save": { "enabled": true, "every_n_seconds": null, "every_n_epochs": 50, "epochs": [], "on_best_validation": false, "on_best_rollout_return": false, "on_best_rollout_success_rate": true }, "epoch_every_n_steps": 100, "validation_epoch_every_n_steps": 10, "rollout": { "enabled": true, "n": 50, "horizon": 400, "rate": 50, "warmstart": 0, "terminate_on_success": true } }, "train": { "data": "/tmp/test_v141.hdf5", "output_dir": "../bc_trained_models", "num_data_workers": 0, "hdf5_cache_mode": "all", "hdf5_use_swmr": true, "hdf5_normalize_obs": false, "hdf5_filter_key": null, "seq_length": 1, "goal_mode": null, "cuda": true, "batch_size": 100, "num_epochs": 2000, "seed": 1 }, "algo": { "optim_params": { "policy": { "learning_rate": { "initial": 0.0001, "decay_factor": 0.1, "epoch_schedule": [] }, "regularization": { "L2": 0.0 } } }, "actor_layer_dims": [ 1024, 1024 ], "gmm": { "enabled": false, "num_modes": 5, "min_std": 0.0001, "std_activation": "softplus", "low_noise_eval": true }, "rnn": { "enabled": false, "horizon": 10, "hidden_dim": 400, "rnn_type": "LSTM", "num_layers": 2 } } } ``` -------------------------------- ### Example of Reproducing Low-Dim BC and BC-RNN Training Source: https://robomimic.github.io/docs/v0.2/sources/datasets/robomimic_v0.1.md.txt Navigate to the generated config directory and copy training commands from the shell script to reproduce specific training runs. This example shows how to reproduce low-dim BC and BC-RNN results on the Lift PH dataset. ```bash # task: lift # dataset type: ph ``` -------------------------------- ### Visualize Initial Demonstration Frames Source: https://robomimic.github.io/docs/tutorials/dataset_contents.html Render only the initial frames of the dataset's demonstrations to a video file, showing the 'agentview' camera. ```bash $ python playback_dataset.py --dataset ../../tests/assets/test_v15.hdf5 --first --render_image_names agentview --video_path /tmp/dataset_task_inits.mp4 ``` -------------------------------- ### Run Debug Training Loop Source: https://robomimic.github.io/docs/introduction/installation.html Executes a quick debugging training loop using the BC RNN example to verify robomimic installation. Assumes robomimic was installed from source. ```bash $ cd $ python examples/train_bc_rnn.py --debug ``` -------------------------------- ### Run Training Command (Quick Example) Source: https://robomimic.github.io/docs/datasets/robomimic_v0.1.html Executes a training command using a specific configuration file. The training command can be found in the generated shell script. ```bash # the training command can be found in robomimic/exps/paper/core.sh # Training results can be viewed at /tmp/experiment_results (--output_dir when generating paper configs). $ python train.py --config ../exps/paper/core/lift/ph/low_dim/bc_rnn.json ``` -------------------------------- ### Creating an ObservationEncoder with VisualCore Source: https://robomimic.github.io/docs/modules/models.html Example of manually creating an ObservationEncoder instance by registering an image modality with a VisualCore network and a CropRandomizer. This setup processes image inputs for the encoder. ```python from robomimic.models.base_nets import MLP from robomimic.models.obs_core import VisualCore, CropRandomizer from robomimic.models.obs_nets import ObservationEncoder, ObservationDecoder obs_encoder = ObservationEncoder(feature_activation=torch.nn.ReLU) # There are two ways to construct the network for processing a input modality. # Assume we are processing image input of shape (3, 224, 224). camera1_shape = [3, 224, 224] image_randomizer = CropRandomizer(input_shape=camera2_shape, crop_height=200, crop_width=200) # We will use a reconfigurable image processing backbone VisualCore to process the input image modality net_class = "VisualCore" # this is defined in models/base_nets.py # kwargs for VisualCore network net_kwargs = { "input_shape": camera1_shape, "core_class": "ResNet18Conv", # use ResNet18 as the visualcore backbone "core_kwargs": {"pretrained": False, "input_coord_conv": False}, "pool_class": "SpatialSoftmax", # use spatial softmax to regularize the model output "pool_kwargs": {"num_kp": 32} } # register the network for processing the modality obs_encoder.register_obs_key( name="camera1", shape=camera1_shape, net_class=net_class, net_kwargs=net_kwargs, randomizers=image_randomizer ) ``` -------------------------------- ### Download Datasets and Generate Configurations Source: https://robomimic.github.io/docs/v0.4/datasets/robomimic_v0.1.html Quick example commands to download datasets and generate experiment configurations. Training commands can then be found in the generated shell scripts. ```bash # default behavior for download script - just download lift proficient-human low-dim dataset to robomimic/../datasets $ python download_datasets.py # generate json configs for running all experiments at robomimic/exps/paper $ python generate_paper_configs.py --output_dir /tmp/experiment_results # the training command can be found in robomimic/exps/paper/core.sh # Training results can be viewed at /tmp/experiment_results (--output_dir when generating paper configs). $ python train.py --config ../exps/paper/core/lift/ph/low_dim/bc_rnn.json ``` -------------------------------- ### RoboMimic Train Loop Example Source: https://robomimic.github.io/docs/sources/modules/algorithms.md.txt Demonstrates the typical training loop using RoboMimic's Algo class methods. Ensure the model is in train mode before starting. ```python # @model should be instance of Algo class to use for training # @data_loader should be instance of torch.utils.data.DataLoader for sampling batches # train for 50 epochs and 100 gradient steps per epoch num_epochs = 50 gradient_steps_per_epoch = 100 # ensure model is in train mode model.set_train() for epoch in range(1, num_epochs + 1): # epoch numbers start at 1 # iterator for data_loader - it yields batches data_loader_iter = iter(data_loader) # record losses losses = [] for _ in range(gradient_steps_per_epoch): # load next batch from data loader try: batch = next(data_loader_iter) except StopIteration: # data loader ran out of batches - reset and yield first batch data_loader_iter = iter(data_loader) batch = next(data_loader_iter) # process batch for training input_batch = model.process_batch_for_training(batch) # forward and backward pass info = model.train_on_batch(batch=input_batch, epoch=epoch, validate=False) # record loss step_log = model.log_info(info) losses.append(step_log["Loss"]) # save model model_params = model.serialize() model_dict = dict(model=model.serialize()) torch.save(model_dict, /path/to/ckpt.pth) # do anything model needs to after finishing epoch model.on_epoch_end(epoch) ``` -------------------------------- ### Rollout Loop with RolloutPolicy Source: https://robomimic.github.io/docs/v0.2/sources/modules/algorithms.md.txt Execute a rollout loop using the RolloutPolicy. This involves starting an episode, resetting the environment, and iteratively getting actions from the policy, stepping the environment, and accumulating return until the horizon is reached or the episode is done. ```python # @policy should be instance of RolloutPolicy assert isinstance(policy, RolloutPolicy) # episode reset (calls @set_eval and @reset) policy.start_episode() obs = env.reset() horizon = 400 total_return = 0 for step_i in range(horizon): # get action from policy (calls @get_action) act = policy(obs) # play action next_obs, r, done = env.step(act) total_return += r success = env.is_success()["task"] if done or success: break ``` -------------------------------- ### Build Documentation Locally Source: https://robomimic.github.io/docs/v0.4/sources/introduction/installation.md.txt Builds the documentation locally after installing dependencies. Navigate to the 'docs' directory and execute the make commands. ```sh cd /docs make clean make apidoc make html cp -r images _build/html/ ``` -------------------------------- ### Launch Training with JSON Config Source: https://robomimic.github.io/docs/tutorials/configs.html This command launches a training run using a predefined BC algorithm configuration file and specifies the dataset. This is the recommended method for launching training. ```bash $ python train.py --config ../exps/templates/bc.json --dataset ../../tests/assets/test_v15.hdf5 ``` -------------------------------- ### Install Robosuite via Pip Source: https://robomimic.github.io/docs/sources/introduction/installation.md.txt Installs the robosuite simulator directly from PyPI. This is a simpler installation method. ```shell # Via pip $ pip install robosuite ``` -------------------------------- ### Install Robomimic via Pip Source: https://robomimic.github.io/docs/v0.2/sources/introduction/installation.md.txt Installs Robomimic directly using pip. This is a simpler alternative to installing from source. ```sh pip install robomimic ``` -------------------------------- ### Launch Training with Default Transformer Config Source: https://robomimic.github.io/docs/sources/tutorials/training_transformers.md.txt Use this command to start training with the default transformer configuration. Specify your dataset path using the `--dataset` argument. ```bash python train.py --config ../config/default_templates/bc_transformer.json --dataset /path/to/dataset.hdf5 ``` -------------------------------- ### Test Robomimic Installation (Debug) Source: https://robomimic.github.io/docs/sources/introduction/installation.md.txt Runs a quick debugging training loop to verify that robomimic is installed correctly. Assumes robomimic was installed from source. ```shell $ cd $ python examples/train_bc_rnn.py --debug ``` -------------------------------- ### Configure and Launch Training in Python Source: https://robomimic.github.io/docs/v0.2/tutorials/configs.html Construct a default configuration object in Python, modify its attributes, and then launch the training run. Ensure the dataset and output directory paths are correctly set. ```python import robomimic import robomimic.utils.torch_utils as TorchUtils from robomimic.config import config_factory from robomimic.scripts.train import train # make default BC config config = config_factory(algo_name="bc") # set config attributes here that you would like to update config.experiment.name = "bc_rnn_example" config.train.data = "/path/to/dataset.hdf5" config.train.output_dir = "/path/to/desired/output_dir" config.train.batch_size = 256 config.train.num_epochs = 500 config.algo.gmm.enabled = False # get torch device device = TorchUtils.get_torch_device(try_to_use_cuda=True) # launch training run train(config, device=device) ``` -------------------------------- ### Visualize Initial Demonstration Frames Source: https://robomimic.github.io/docs/sources/tutorials/dataset_contents.md.txt Render only the initial frames of the dataset's demonstrations to a video file. This helps in quickly reviewing the starting states of trajectories. ```bash python playback_dataset.py --dataset ../../tests/assets/test_v15.hdf5 --first --render_image_names agentview --video_path /tmp/dataset_task_inits.mp4 ``` -------------------------------- ### Install PyTorch on Mac Source: https://robomimic.github.io/docs/introduction/installation.html Installs PyTorch version 2.0.0 and Torchvision version 0.15.1 from the PyTorch conda channel. Does not install cudatoolkit as Mac does not have NVIDIA GPUs. ```bash # Can change pytorch, torchvision versions # We don't install cudatoolkit since Mac does not have NVIDIA GPU $ conda install pytorch==2.0.0 torchvision==0.15.1 -c pytorch ``` -------------------------------- ### Install Robomimic via Pip Source: https://robomimic.github.io/docs/introduction/installation.html Installs the robomimic library directly using pip. ```bash $ pip install robomimic ``` -------------------------------- ### Run Comprehensive Installation Test Source: https://robomimic.github.io/docs/introduction/installation.html Executes a thorough test suite for several algorithms and scripts to ensure robomimic is installed correctly. This script may take several minutes to finish. Assumes robomimic was installed from source. ```bash $ cd /tests $ bash test.sh ``` -------------------------------- ### Build and View Documentation Locally Source: https://robomimic.github.io/docs/sources/introduction/installation.md.txt Generate the documentation locally and view it in a web browser. Ensure you are in the correct directory before running these commands. ```sh cd /docs make clean make apidoc make html make prep cp -r images _build/html/ ``` -------------------------------- ### Generate Paper Configurations (Quick Example) Source: https://robomimic.github.io/docs/datasets/robomimic_v0.1.html Generates JSON configs for running all paper experiments. Training results are viewed at the specified output directory. ```bash # generate json configs for running all experiments at robomimic/exps/paper $ python generate_paper_configs.py --output_dir /tmp/experiment_results ``` -------------------------------- ### Install Robosuite via Pip Source: https://robomimic.github.io/docs/introduction/installation.html Installs the robosuite library directly using pip. Compatible with robosuite v1.2+. ```bash # Via pip $ pip install robosuite ``` -------------------------------- ### Install PyTorch on Linux Source: https://robomimic.github.io/docs/introduction/installation.html Installs PyTorch version 2.0.0 and Torchvision version 0.15.1 from the PyTorch conda channel. ```bash # Can change pytorch, torchvision versions $ conda install pytorch==2.0.0 torchvision==0.15.1 -c pytorch ``` -------------------------------- ### Build and View Local Documentation Source: https://robomimic.github.io/docs/introduction/installation.html Commands to clean, generate API documentation, build HTML documentation, prepare it, and copy images. The documentation can then be viewed locally by opening '_build/html/index.html' in a web browser. ```bash $ cd /docs $ make clean $ make apidoc $ make html $ make prep $ cp -r images _build/html/ ``` -------------------------------- ### Visualize Initial Demonstration Frames Source: https://robomimic.github.io/docs/v0.2/tutorials/dataset_contents.html Use `playback_dataset.py` to visualize only the initial frames of demonstrations. This focuses on the starting states of trajectories and renders a specified camera view to a video file. ```bash # Visualize only the initial demonstration frames. $ python playback_dataset.py --dataset ../../tests/assets/test.hdf5 --first --render_image_names agentview --video_path /tmp/dataset_task_inits.mp4 ``` -------------------------------- ### Creating Configs using Config Factory Source: https://robomimic.github.io/docs/sources/modules/configs.md.txt Demonstrates the standard entry point for creating configuration objects in the codebase. It shows how to create a base config for an algorithm and then update it with values from a JSON file. ```python import json from robomimic.config import config_factory # base config for algorithm with default values config = config_factory("bc") # update defaults with config json with open("/path/to/config.json", "r") as f: ext_config_json = json.load(f) config.update(ext_config_json) ``` -------------------------------- ### Install Robomimic via Pip Source: https://robomimic.github.io/docs/sources/introduction/installation.md.txt Installs the latest stable version of robomimic directly from the Python Package Index (PyPI). ```shell $ pip install robomimic ``` -------------------------------- ### Playback Dataset Trajectories with Rendering Source: https://robomimic.github.io/docs/sources/tutorials/dataset_contents.md.txt Visualize dataset trajectories by rendering agent and robot cameras to a video file. This example plays the first 5 trajectories. ```bash python playback_dataset.py --dataset ../../tests/assets/test_v15.hdf5 --render_image_names agentview robot0_eye_in_hand --video_path /tmp/playback_dataset.mp4 --n 5 ``` -------------------------------- ### Install PyTorch on Mac Source: https://robomimic.github.io/docs/v0.2/introduction/installation.html Installs PyTorch version 1.6.0 and torchvision version 0.7.0 from the PyTorch conda channel. This is for Mac users as it does not include cudatoolkit. ```bash # Can change pytorch, torchvision versions # We don't install cudatoolkit since Mac does not have NVIDIA GPU $ conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch ``` -------------------------------- ### Build and View Local Documentation Source: https://robomimic.github.io/docs/v0.3/introduction/installation.html Commands to clean, generate API documentation, build HTML documentation, copy images, and view the locally built documentation in a web browser. ```bash $ cd /docs $ make clean $ make apidoc $ make html $ cp -r images _build/html/ ``` -------------------------------- ### VisualCore Initialization with ResNet18Conv and SpatialSoftmax Source: https://robomimic.github.io/docs/v0.2/sources/modules/models.md.txt Example demonstrating the initialization of a VisualCore module. It uses a ResNet18Conv backbone and a SpatialSoftmax pooling module, with specified input shape and feature dimensions. ```python from robomimic.models.base_nets import VisualCore, ResNet18Conv, SpatialSoftmax vis_net = VisualCore( input_shape=(3, 224, 224), core_class="ResNet18Conv", # use ResNet18 as the visualcore backbone core_kwargs={"pretrained": False, "input_coord_conv": False}, # kwargs for the ResNet18Conv class pool_class="SpatialSoftmax", # use spatial softmax to regularize the model output pool_kwargs={"num_kp": 32}, # kwargs for the SpatialSoftmax --- use 32 keypoints flatten=True, # flatten the output of the spatial softmax layer feature_dimension=64, # project the flattened feature into a 64-dim vector through a linear layer ) ``` -------------------------------- ### Install PyTorch on Mac Source: https://robomimic.github.io/docs/v0.3/sources/introduction/installation.md.txt Install PyTorch version 2.0.0 and Torchvision version 0.15.1 using conda. This command is specific to Mac systems as it does not include cudatoolkit. ```sh conda install pytorch==2.0.0 torchvision==0.15.1 -c pytorch ``` -------------------------------- ### Install PyTorch on Linux Source: https://robomimic.github.io/docs/v0.2/introduction/installation.html Installs PyTorch version 1.6.0, torchvision version 0.7.0, and cudatoolkit 10.2 from the PyTorch conda channel. This is for Linux users with NVIDIA GPUs. ```bash # Can change pytorch, torchvision versions $ conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.2 -c pytorch ``` -------------------------------- ### Display Help for dataset_states_to_obs.py Source: https://robomimic.github.io/docs/datasets/robosuite.html Displays all available command-line arguments for the dataset_states_to_obs.py script, useful for understanding all processing options. ```bash # For seeing descriptions of all the command-line args available $ python dataset_states_to_obs.py --help ``` -------------------------------- ### Construct and Launch Training with Python Config Object Source: https://robomimic.github.io/docs/tutorials/configs.html This Python script demonstrates how to create a default BC configuration, modify specific parameters in code, and then launch the training run. It shows how to set experiment name, dataset path, output directory, batch size, number of epochs, and algorithm-specific parameters like GMM. ```python import robomimic import robomimic.utils.torch_utils as TorchUtils from robomimic.config import config_factory from robomimic.scripts.train import train # make default BC config config = config_factory(algo_name="bc") # set config attributes here that you would like to update config.experiment.name = "bc_rnn_example" config.train.data = [{"path": "/path/to/dataset.hdf5"}] config.train.output_dir = "/path/to/desired/output_dir" config.train.batch_size = 256 config.train.num_epochs = 500 config.algo.gmm.enabled = False # get torch device device = TorchUtils.get_torch_device(try_to_use_cuda=True) # launch training run train(config, device=device) ```