Add a new task to Diffusion Policy
mainTo implement a new task, you must create a new dataset class, an environment runner, and a configuration file. Follow these steps:
- Implement the Dataset: Create a new dataset class (e.g., by imitating
diffusion_policy/dataset/pusht_image_dataset.py). - Implement the Environment Runner: Create a new runner class (e.g., by imitating
diffusion_policy/env_runner/pusht_image_runner.py). - Create a Config File: Define the task configuration in a YAML file (e.g.,
diffusion_policy/config/task/pusht_image.yaml).
Requirements:
- Ensure
shape_metacorrectly corresponds to the input and output shapes for your specific task. - Update
env_runner._target_anddataset._target_in your configuration to point to your newly created classes. - When training, pass the task name as an argument to
train.pyusingtask=<your_task_name>.