This commit is contained in:
Alexander Soare 2024-05-20 12:14:31 +01:00
parent 6e439c1a0c
commit 45c6a67677
2 changed files with 9 additions and 7 deletions

View File

@ -14,7 +14,7 @@ LeRobot offers a training script at [`lerobot/scripts/train.py`](../../lerobot/s
Explaining the ins and outs of [Hydra](https://hydra.cc/docs/intro/) is beyond the scope of this document, but here we'll share the main points you need to know.
First, `lerobot/configs` might have a directory structure like this:
First, `lerobot/configs` has a directory structure like this:
```
.
@ -76,7 +76,7 @@ _As an aside: we've set up our configurations so that they reproduce state-of-th
## Overriding configuration parameters in the CLI
If you look in `env/aloha.yaml` you might see:
If you look in `env/aloha.yaml` you will see something like:
```yaml
# lerobot/configs/env/aloha.yaml
@ -84,7 +84,7 @@ env:
task: AlohaInsertion-v0
```
And if you look in `policy/act.yaml` you might see:
And if you look in `policy/act.yaml` you will see something like:
```yaml
# lerobot/configs/policy/act.yaml

View File

@ -1,16 +1,18 @@
In this tutorial we will adapt the default configuration for ACT to be compatible with the PushT environment and dataset.
In this tutorial we will learn how to adapt a policy configuration to be compatible with a new environment and dataset. As a concrete example, we will adapt the default configuration for ACT to be compatible with the PushT environment and dataset.
If you haven't already read our tutorial on the [training script and configuration tooling](../4_train_policy_with_script.md) please do so prior to tackling this tutorial.
Let's get started! Now, why don't you try running:
Let's get started!
Suppose we want to train ACT for PushT. Well, there are aspects of the ACT configuration that are specific to the ALOHA environments, and these happen to be incompatible with PushT. Therefore, trying to run the following will almost certainly raise an exception of sorts (eg: feature dimension mismatch):
```bash
python lerobot/scripts/train.py policy=act env=pusht dataset_repo_id=lerobot/pusht
```
That was a little mean of us, because if you did try running that command, you almost certainly got an exception of sorts. That's because there are aspects of the ACT configuration that are specific to the ALOHA environments, and here we have tried to use PushT.
We need to adapt the parameters of the ACT policy configuration to the PushT environment. The most important ones are the image keys.
The most important ones are the image keys. ALOHA's datasets and environments typically use a variable number of cameras. In `lerobot/configs/policy/act.yaml` you may notice two relevant sections. Here we show you the minimal diff needed to adjust to PushT:
ALOHA's datasets and environments typically use a variable number of cameras. In `lerobot/configs/policy/act.yaml` you may notice two relevant sections. Here we show you the minimal diff needed to adjust to PushT:
```diff
override_dataset_stats: