# Download a version

> Download a dataset version as LeRobot v3, LeRobot v2.1 or MCAP, for Physical Intelligence or Dream Labs, or the files as uploaded

For LeRobot and MCAP version downloads:

You download a saved version, never the live dataset. Saving a version gives
it a name, its tag (for example `1.0`), and pins its selected episodes and
revisions. A preview-made version includes the saved drawing windows you
published as immutable cut episodes. Later drawings, rulings or re-ingest do
not change those media windows, task labels or normalization. Head has no
download: publish a version first.

Without a version in the dataset reference, the command resolves the newest
saved version (`stable`). A fresh upload has none until you tag one, so it
takes `v0`, the upload as it arrived, and says so. `original` downloads the files the upload sent,
prepared on the server, without a version; it is described separately below.

| `--format`       | You get                                                  |
| ---------------- | -------------------------------------------------------- |
| `lerobot_v3`     | A LeRobot v3 directory (default)                         |
| `lerobot_v2_1`   | A LeRobot v2.1 directory, for loaders that predate v3    |
| `mcap_ros2`      | An MCAP file set with ROS 2 messages                     |
| `pi_mcap_v1`     | Files to upload to Physical Intelligence (Pi MCAP, π0.7) |
| `dreamlabs_v2_1` | Files to upload to Dream Labs (LeRobot v2.1 with H.264)  |
| `original`       | The files the newest upload sent, byte for byte          |

A version with no kept episodes has no download.

## Dashboard

The dashboard gives you the CLI command for a version, ready to copy. The
download itself runs in the [CLI](#cli).

1. Open **Datasets**. On the dataset's card, click **…** in its top right
   corner, then **Download** and the version's name. Or open the dataset and
   click **Download** in its header. Both offer the newest version.
2. Choose **LeRobot v3.0**, **LeRobot v2.1**, **MCAP (ROS 2)**, **Pi MCAP
   (π0.7)** or **LeRobot v2.1 for Dream Labs**. MCAP gives one `.mcap` file
   per episode, for ROS 2 tools. A version with no robot state, or with a
   camera not stored as AV1 video, can't be made into MCAP. The last two are
   [partner layouts](#partner-layouts).
3. Copy the command and run it on the machine the dataset should go to.

The first time, [install the CLI](https://docs.qualia.dev/cli/overview.md) and run `qualia auth login`
with an API key from your workspace's **Settings → API keys**.

**Download** stays disabled until the dataset has a version. To save one on an
upload or merged dataset, click **Publish**, choose the include groups, and
use **Apply all** to freeze and measure its saved drawings. Review omissions,
then name it and choose **Create version**. Review need not be complete;
**Kept by a person** is the default selection. A mixture instead tags its
resolved head. See [Publish a version](https://docs.qualia.dev/global/guides/curation.md#versions).

For an older version, open the dataset's **versions** tab, which lists every
tag, newest first (**Current** is the head), and click the tag. Its version
page has the same **Download** section. Open **Version details** there to copy
the **DatasetVersion id** or read the version reference, such as
`my-dataset:1.0`. Head has no DatasetVersion id.

## CLI

`qualia dataset pin` saves the version and prints its DatasetVersion id. Use
the dataset slug or UUID before the colon in `qualia dataset download`:

```bash
qualia dataset pin <DATASET_UUID> 1.0 --note "first cut"
# Pinned DatasetVersion <DATASET_VERSION_UUID> (<DATASET>:1.0, 120 episode(s))

# LeRobot v3, the newest version (stable, or v0 when nothing is tagged yet)
qualia dataset download my-dataset

# The version an upload printed, by reference or by its DatasetVersion id
qualia dataset download my-dataset:v0
qualia dataset download my-dataset:<DATASET_VERSION_UUID>

# LeRobot v3, version 1.0
qualia dataset download my-dataset:1.0

# LeRobot v2.1
qualia dataset download my-dataset:1.0 --format lerobot_v2_1

# MCAP with ROS 2 messages
qualia dataset download my-dataset:1.0 --format mcap_ros2

# Files to upload to Physical Intelligence or Dream Labs
qualia dataset download my-dataset:1.0 --format pi_mcap_v1
qualia dataset download my-dataset:1.0 --format dreamlabs_v2_1

# The files the newest upload sent, byte for byte
qualia dataset download my-dataset --format original
```

The folder defaults to `./<slug>-<tag>`, with `-v21`, `-mcap`, `-pi` or
`-dreamlabs` added for those formats, and to `./<slug>-original` for `original`; pass a second argument to
choose it. A spinner shows while the server prepares the files, then a bar
with bytes, speed and files. The
command ends with a line such as
`Saved my-dataset:1.0 as mcap_ros2 to /home/me/my-dataset-1.0-mcap (12 files, 1.2 GB)`.
Files are checked as they arrive, and running the command again after a stop
fetches only what is missing.

`original` is the files the dataset's newest upload sent, byte for byte, at the
paths they were sent with, and nothing Qualia wrote beside them (no `meta/qds`
annotations, ingest report or converted data), so the folder uploads again as it
is. It takes no version, and trims, splits and rulings are not applied: tag a
version and download that for the curated episodes. The server prepares the
copies on the first download, as for any format. Only an upload has files of its
own, so a merged dataset (the error names its members), a mixture and a partial
copy are refused. Three more cases are refused, with the server's reason: an
upload that derived no episodes, an upload with a sent file that has no
recorded SHA-256, and an original build that failed (it stays failed for that
upload). For an upload that derived no episodes, upload the folder again with a
corrected `meta/ingest.toml`: ingesting it again gives the dataset versions to
download, but its original files stay refused.

An MCAP download keeps only what was mapped at upload, so `tf`, diagnostics and
custom topics do not come back; use `original` when you need them byte for
byte. Each episode holds its joint positions with their velocity and effort
when the recording has them, the action, the task and the cameras.

### What a LeRobot download holds

A LeRobot download (`lerobot_v3` or `lerobot_v2_1`) is the version's episodes,
numbered from 0 in the version's order, with their task labels. State and
action values equal the upload's, except in a handheld recording resolved at
the TCP (below).

It says where each episode came from:

- `robot_type` in `meta/info.json`: the one the upload named (the commonest
  among the version's episodes), or `unknown` when none named one.
- `qds_episode_id`, `qds_source_dataset_id` and `qds_take_episode_id` for each
  episode: the episode, the upload it was recorded in, and the take it was cut
  from (itself, unless it is a piece of a split take). They are keys in
  `meta/episodes.jsonl` (v2.1) and columns of
  `meta/episodes/chunk-000/file-000.parquet` (v3).

`qds_episode_id` is the id the API names the episode by.
`qualia dataset episodes <DATASET_UUID> --json` maps it back: an episode's
`index` there is its `episode_index` in the folder you uploaded, and a piece
carries its take's as `parentIndex`.

Without `--labels` it holds no ruling, check finding, reason, moment, subtask or
tag, and not the version's tag or note. `--labels` writes the rulings, check
readings, open issues and subtasks into the folder
([below](#labels-with-a-lerobot-download)); read episode tags and the
version's note from the API.

Three things differ from the upload. Video is AV1: a camera recorded in another
codec is encoded again at the same size and frame rate, so its pixels are close
to the upload's but not equal. `timestamp` is a 64-bit float that starts at 0
in every episode. And `task_index` follows the task texts in byte order, so it
can differ from the upload's. For the upload's own bytes, download `original`.

A handheld (UMI) recording whose poses were resolved at the TCP downloads
differently. One `observation.state` of 20 values replaces the upload's state
and action columns. It holds the calibrated TCP poses: per hand, left then
right, six values for the rotation, then x, y, z and the gripper's finger
joint in radians. There are no action columns: training derives its targets
from later state rows. `meta/info.json` says so under `qds_handheld_state`.

### Labels with a LeRobot download

`--labels` (`labels=True` in the SDK) also writes what Qualia knows about each
exported episode into a `lerobot_v3` or `lerobot_v2_1` folder, once its files
are checked and before the folder appears. Any other format, `original`
included, is refused before anything is fetched. `--labels` needs qualia-cli
0.3.0rc16 or newer, `labels=True` qualia-sdk 0.8.0rc16 or newer.

```bash
qualia dataset download my-dataset:1.0 --labels
```

`meta/qualia/labels.jsonl` holds one JSON line per exported episode, in
`episode_index` order: matched by `qds_episode_id` in a `lerobot_v2_1` folder,
by the version's own order in a `lerobot_v3` folder. Each row holds:

- `episode_index`, `qds_episode_id`, `qds_take_episode_id`, and `source`: the
  upload it was recorded in, its index there, and for a piece or a trimmed take
  its window in the take's recording.
- `task`, and `linked_task` with the Task's name and revision.
- `decision`: `state` (`KEPT`, `REJECTED` or `UNREVIEWED`), `verdict`,
  `reason`, `time`, and `by`: whether a person, the model or a rule decided,
  never a name, and whether an API key did.
- `check`: the video check's standing reading. `verdict` (`PASS`, `FAIL` or
  `UNCERTAIN`) with its `confidence`, `reason` (the explanation), `moments`,
  the Task revision it judged (`task_revision`), and each of its `findings`.
  `UNCERTAIN` is what the API's findings call `UNKNOWN`
  (`qualia dataset checks findings`): the same reading. With no reading,
  `checked` is false.
- `issues`: the open issues and notes (`code`, `blocks`, `state`, `text`,
  `seconds`).
- `subtasks`: the spans as the version froze them.
- `quality`: `outcome` and `quality_tier`, when set.

Every `seconds` counts from the first frame of the exported episode, so a trim
is already subtracted; only `source.window` is in seconds of the source take.
What the platform does not say is `null` or empty.

`meta/qualia/export.json` names the dataset, the version (`tag`, `digest`) and
the format, says when the files were downloaded (`downloaded_at`) and when the
labels were read (`labels_as_of`), and counts the episodes kept, checked, not
checked and failed.

Decisions, check readings and issues are the platform's current ones at
`labels_as_of`, the time of the download, not the ones it had when the version
was tagged; subtasks are the version's. Download again into the same folder
with `--labels` to read them afresh: the files are checked again, not fetched.
Reading the labels takes a few more calls once the files are in: four reads (the
version's episodes, the dataset, its check findings and its issues, 1,000 to a
page) plus one for each linked Task, and more when a list runs past one page; a
merged dataset or a mixture also reads its sources.

The file names no person, but it carries reviewers' reasons and issue text:
read it before you publish the folder.

```python
result = client.data.download("my-dataset:1.0", "./my-dataset-1.0", labels=True)
print(result.labels.counts)  # episodes, kept, checked, not_checked, failed
rows = client.versions.labels("my-dataset:1.0").rows  # the same rows, no download
```

### Load it in LeRobot

A LeRobot download is a folder that LeRobot's own `LeRobotDataset` reads from
disk. Which `lerobot` release reads it depends on the format. Checked in
November 2026, when 0.7.0 was the newest release:

| `--format`     | `lerobot` release                                             |
| -------------- | ------------------------------------------------------------- |
| `lerobot_v3`   | 0.7.0                                                         |
| `lerobot_v2_1` | 0.3.3, the last before LeRobot v3. 0.4.0 and 0.7.0 refuse it. |

So download `lerobot_v3` unless your training code is pinned to an older
`lerobot`. Install `lerobot` with its `dataset` extra: after a plain
`pip install lerobot`, the import below fails with
`'datasets' is required but not installed`.

```bash
pip install 'lerobot[dataset]'
```

```python
import torch
from lerobot.datasets.lerobot_dataset import LeRobotDataset

# with root, the folder is read as it is and the first argument is only a name
dataset = LeRobotDataset("my-dataset", root="./my-dataset-1.0")
sample = dataset[0]  # one frame, its video decoded
print(dataset.num_episodes, dataset.num_frames, sample["task"])
print({k: tuple(v.shape) for k, v in sample.items() if hasattr(v, "shape")})

loader = torch.utils.data.DataLoader(dataset, batch_size=8, shuffle=True)
batch = next(iter(loader))
print(batch["observation.state"].shape)
```

`lerobot` 0.7.0 refuses a `lerobot_v2_1` folder:
`We introduced a new format since v3.0 which is not backward compatible with v2.1`.
If you hold one, download the version again as `lerobot_v3`, or convert the
folder with LeRobot's own script:

```bash
python -m lerobot.scripts.convert_dataset_v21_to_v30 \
  --repo-id=my-dataset --root=./my-dataset-1.0-v21 --push-to-hub=false
```

The script converts the folder in place and keeps the v2.1 files beside it, in
`./my-dataset-1.0-v21_old`. `--push-to-hub=false` keeps it from uploading the
result to the Hugging Face Hub. Load the converted folder with the snippet
above, setting `root="./my-dataset-1.0-v21"`. It keeps each episode's `qds_*` ids.

### Partner layouts

`pi_mcap_v1` and `dreamlabs_v2_1` are files you upload to Physical Intelligence
or Dream Labs with your own account. They hold the version's episodes that are
not rejected; `dreamlabs_v2_1` holds only the successful ones. `pi_mcap_v1` is
one set of MCAP shards per episode, a `pi_manifest.json` and `upload_to_pi.py`;
`dreamlabs_v2_1` is LeRobot v2.1 with H.264 video and the embodiment file Dream
Labs reads. Each has a `README.md` that says how to upload it. An episode that
could not be converted is listed there with its error; the rest still
download. A version whose episodes are all rejected (for Dream Labs: none is
successful) has nothing to download in that layout. To send with the
organization's own partner key instead, use **Export** or **Send to** in the
dashboard.

Tagging and resolving `<dataset>:<tag>` act in the API key's own account. See
[`qualia dataset download`](https://docs.qualia.dev/cli/commands.md#qualia-dataset-download).

A download needs the version rendered in that format on the server, and a
rendering is not kept for good: it belongs to the renderer that made it, and a
new renderer starts over. So a download starts the rendering when none stands,
on the first download and again after a new renderer, and that needs a key that
can write to the dataset (`data:write`). While a rendering stands, downloads of
the version in that format need read access only (`data:read`).

To see which it is without starting anything, read the rendering's state:
`client.versions.get_materialization("my-dataset:1.0", layout="lerobot_v3")`
starts nothing. Its `state` is `SUCCEEDED` when the rendering stands and
`RUNNING` while it renders; `NOT_STARTED` or `INTERRUPTED` means the next
download has to start it
([Download a version](https://docs.qualia.dev/sdk/resources/versions.md#download-a-version)). A
download that renders waits for it: minutes, one to three for 10 to 24 episodes
when measured. Rendering a LeRobot or MCAP version spends no credits.

The command also accepts a full
`accounts/<account>/datasets/<dataset>/versions/<tag>` name. The
dashboard's **Download** line names the version by its reference. `head` has no
download: pin a tag first.

## SDK

```python
from qualia import Qualia

client = Qualia()

result = client.data.download(
    "my-dataset:1.0",
    "./my-dataset-1.0",
    format="lerobot_v3",  # or "lerobot_v2_1", "mcap_ros2", "pi_mcap_v1", "dreamlabs_v2_1"
)
print(result.destination, result.file_count)

# the files the newest upload sent, byte for byte (no version)
result = client.data.download("my-dataset", format="original")
```

See [Download a version](https://docs.qualia.dev/sdk/resources/versions.md#download-a-version).

## When a download is refused

A version that contains a blocked episode (a NaN, an infinity, a missing value
or a wrong width in its state or action rows) is refused, because a download
carries every episode. Publish a curated version without those episodes as a
new dataset, then download that version. See
[`qualia dataset curate`](https://docs.qualia.dev/cli/commands.md#qualia-dataset-curate).
`--format original` is not refused: it copies the files the upload sent,
blocked episodes included.
