> ## Documentation Index
> Fetch the complete documentation index at: https://avala.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Exports

> Bring LeRobot datasets into Avala, export Avala datasets to LeRobot, and what each fleet learning release contains

A fleet learning release is built for your training stack. This page covers the LeRobot importer, the LeRobot exporter and the files that ship with every release.

## What ships with each release

Every release in a fleet learning program includes:

| Item | Contents |
| - | - |
| Dataset release | A versioned, rights-cleared Avala dataset. Training lanes and the failure-and-recovery lane are delivered as slices. |
| Outcome labels | The current [outcome label](/docs/fleet-learning/sequence-metadata.md) of each sequence, readable through the API, the SDKs, the CLI and the MCP server. |
| LeRobot export | The release in LeRobot v3 format, with the outcome labels in `meta/avala_sequence_outcomes.jsonl`. |
| Coverage report | The [coverage report](/docs/fleet-learning/coverage.md#the-coverage-report) for the delivery. |
| Capability report | The latest [capability report](/docs/fleet-learning/evaluation.md#the-capability-report), when an evaluation ran. |

Avala prepares the LeRobot export as part of the program. You run the training.

## Import a LeRobot dataset

The LeRobot importer reads a LeRobot dataset from the Hugging Face Hub or a local directory. It creates an Avala MCAP dataset.

* Each LeRobot episode becomes one `.mcap` file, which Avala ingests as one item. A LeRobot episode maps to an Avala sequence.
* Camera streams are written as `foxglove.CompressedImage`, so they render in the Mission Control viewer.
* Proprioception (`observation.state`, `action` and other 1-D numeric features) is written as `google.protobuf.Struct` messages. The values are preserved and readable as raw messages.
* Every other per-frame column (rewards, `episode_uuid`, `failure_type` and other text columns) is kept on its own topic. A `control_source` column (`policy`, `teleop`, `intervention`, `hold`) lands on `/lerobot/control_source`.

The importer targets the LeRobot v2.1 and v3 dataset API. It needs the `lerobot` extra, which requires Python 3.12 or later. For LeRobot v3 datasets, a torch-free reader also works on Python 3.9 and later: `pip install "avala[lerobot-core-video]"`.

```bash theme={null}
pip install "avala[lerobot]"
```

```bash CLI theme={null}
avala import lerobot \
  --repo-id your-hf-user/your-dataset \
  --name "Teleop rollouts" \
  --slug teleop-rollouts \
  --episodes 0,1,2 \
  --wait
```

```python Python theme={null}
from avala import Client
from avala.importers import import_lerobot

dataset = import_lerobot(
    Client(),
    repo_id="your-hf-user/your-dataset",
    name="Teleop rollouts",
    slug="teleop-rollouts",
    episodes=[0, 1, 2],
    wait=True,
)
print(dataset.uid, dataset.item_count)
```

| CLI option | Purpose |
| - | - |
| `--repo-id` | Hugging Face Hub dataset ID. |
| `--root` | Local LeRobot dataset directory, instead of or alongside `--repo-id`. |
| `--name`, `--slug` | Name and slug of the new Avala dataset (required). |
| `--episodes` | Comma-separated LeRobot episode indices to import. Default: all. |
| `--camera-keys` | Comma-separated camera feature keys. Default: all cameras. |
| `--fps` | Override the dataset frame rate. |
| `--owner` | Dataset owner username or email. |
| `--workers` | Parallel upload threads. Default: 8. |
| `--wait` / `--no-wait` | Wait for indexing to finish. Default: no wait. |

Pass `repo_id`, `root` or both. In Python, `state_keys` selects the numeric features to keep. It defaults to `observation.state` and `action`.

## Export an Avala dataset to LeRobot

You can also convert any Avala sequence dataset to LeRobot v3 yourself. One Avala sequence becomes one LeRobot episode.

```bash theme={null}
avala lerobot export your-org/your-dataset \
  --repo-id your-hf-user/your-dataset \
  --output ./lerobot-out \
  --fps 30 \
  --task "load the dishwasher" \
  --include-outcomes
```

`--include-outcomes` writes each sequence's current outcome label to `meta/avala_sequence_outcomes.jsonl`, one line per LeRobot episode. In Python, pass `include_outcomes=True`. The file format is described in [Export outcome labels with LeRobot](/docs/fleet-learning/sequence-metadata.md#export-outcome-labels-with-lerobot).

Add `--state-key` and `--action-key` when the source frames carry proprioception. The full option list and the Python API are in [Avala + LeRobot](/docs/resources/frameworks/lerobot.md).

## Use outcome labels in training

The outcome labels travel with the LeRobot export. Typical uses:

* Weight or select sequences by `outcome`, `progress`, `quality` and `speed`.
* Train on subtask `label` strings and hand-action `action` strings for language-conditioned policies.
* Split by [leakage group](/docs/fleet-learning/sequence-metadata.md#leakage-groups) when you build your own validation sets.
* Keep sequences with `evaluation_membership` set to `held_out_eval` out of training when you merge data from other sources. Releases never include them.

Technical validity is not in the export. Avala reviews and accepts sequences before they enter a release. See [Technical validity](/docs/fleet-learning/sequence-metadata.md#technical-validity).
