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

# Datasets

> The LeRobot datasets a fine-tune trains on: formats, robots, the check, auto-clean, column and camera mapping, and uploads.

> [!NOTE]
>
> Fine-tuning is in private preview. Only invited accounts can use it; any other account gets `403
>   	fine_tuning_unavailable`.

A fine-tune trains on one LeRobot dataset: an upload, named by its `ds_` id, or a public Hugging Face dataset, named `hf:owner/name`.

## Formats

LeRobot v2.1 and v3.0 datasets are read as they are.
A v2.1 dataset is converted to v3.0 while the job prepares it, with LeRobot's own converter; you do not convert it first.

| Field | Required | Otherwise |
| - | - | - |
| `codebase_version` in `meta/info.json` | `v2.1` or `v3.0` (`v2.0` is read too) | Refused. |
| `fps` | 30 for MolmoAct2 and DreamZero; any rate for π0.5 | Refused for that model. |
| `total_episodes` | At least 5 | Refused. Below 20 is accepted with a warning: a fine-tune on fewer usually overfits. |
| Tasks | A non-empty task string | Refused when every task is empty: the models are prompted with the episode's task. |
| `meta/stats.json` | `min` and `max` of the state and action | Refused. LeRobot writes it when it records or converts a dataset. |

## Robots

The robot is read from the dataset: its `robot_type`, the names of its state values, or, for the YAM, its shape and camera names.

| Robot | How it is recognized | State and action |
| - | - | - |
| Bimanual YAM (`bimanual_yam`) | `robot_type` naming the YAM, the YAM's joint names, or 14 values with `top`, `left` and `right` cameras | 14 values: each arm's joints 0 to 5 then its gripper, left arm first, in radians; grippers from 0 (closed) to 1 (open) |
| SO-100/101 arm (`so101`) | `robot_type` naming the SO-100/101 (every MakerMods `so101_follower` dataset) with 6 values, or its joint names | 6 values: `shoulder_pan`, `shoulder_lift`, `elbow_flex`, `wrist_flex`, `wrist_roll`, `gripper` |
| Two SO-101 arms (`bi_so101`) | `robot_type` naming a bimanual SO-101 with 12 values, or `left_`/`right_` SO-101 joint names | 12 values: the left arm's six, then the right arm's |
| MakerMods Maker Arm (`maker_arm`, `bi_maker_arm`) | `robot_type` naming the Maker Arm with 7 values (14 for a pair), or the arm's URDF joint names (`link_002_joint` to `link_007_joint`, `gripper`) | Six joints and the gripper, in radians |
| Another arm (`custom`) | Anything else | Up to 32 values: π0.5 only |

The check names the robot it found. A robot a model does not train is listed among that model's errors, with the robots it does.

### Bimanual YAM

The YAM's values are in this order:

| Index | Value |
| - | - |
| 0 to 5 | Left arm, joints 0 to 5 (`left_joint_0.pos` to `left_joint_5.pos`) |
| 6 | Left gripper (`left_gripper.pos`) |
| 7 to 12 | Right arm, joints 0 to 5 (`right_joint_0.pos` to `right_joint_5.pos`) |
| 13 | Right gripper (`right_gripper.pos`) |

A joint whose range passes the YAM's own by more than 0.05 rad is accepted with a warning to check its units:

| Joint | Range (rad) |
| - | - |
| 0 | -2.618 to 3.054 |
| 1 | 0 to 3.65 |
| 2 | 0 to 3.665 |
| 3 | -1.693 to 1.571 |
| 4 | -1.571 to 1.571 |
| 5 | -2.094 to 2.094 |

The YAM's three views are the scene from above and each wrist (`observation.images.top`, `left` and `right`, unless [mapped](#mapping) from other cameras).
DreamZero needs 16:9 frames.

### SO-101 and other arms

MolmoAct2 trains one SO-100/101 arm from one or two cameras, in any order.
π0.5 trains any arm from a scene camera and up to two wrist cameras; an arm whose state is wider than 32 values cannot be trained.

## Dataset embodiments

In private preview, a dataset body can be registered with `POST /v1/embodiments`:

```json theme={"theme":"css-variables"}
{
	"name": "dual6",
	"embodiment_config": {
		"state": { "arm": [0, 14] },
		"action": { "arm": [0, 14] },
		"video": { "overhead": "observation.images.head" },
		"parts": {
			"state": { "arm": { "kind": "arm", "side": "left" } },
			"action": { "arm": { "kind": "arm", "side": "left" } }
		}
	}
}
```

The answer is `201` with `id` (`emb_` and 16 hex characters), the account-local `name`, the
validated `embodiment_config` and `created_at` (UTC, six fractional digits).
`GET /v1/embodiments` lists your bodies newest first; `GET /v1/embodiments/<id>` reads one.
Another account's id is `404 not_found`, just like an unknown one.

* Names use 1–64 lowercase letters, digits and dashes, and are unique within your account.
* State and action spans are `[start, end)`, tile from zero without a gap or overlap, and are
  at most 128 values wide each. Part and camera role names start with a lowercase letter,
  followed by lowercase letters, digits or underscores, at most 64 characters.
* There are 1–16 camera roles, each naming a dataset feature. A body without `overhead` needs
  `head_camera` set to one of its declared roles.
* Optional `parts.state` and `parts.action` describe declared spans: `kind` is `arm`, `gripper`,
  `eef_xyz`, `eef_rot6`, `grip` or `head`; optional `side` is `left` or `right`.
* Invalid registrations are `422 invalid_request` with the offending `param`. A duplicate name
  is `409 conflict`. Each account can register at most 200 bodies; registrations are immutable,
  with no update or delete route. Register changes under a new name.

These are **dataset layout records**, not permission to call a new robot or model. Registering
one neither changes a served model's inference contract nor makes a checkpoint servable.
They do not override the job's model compatibility or column mapping.

The source CLI exposes the same records:

```sh theme={"theme":"css-variables"}
abstract embodiments create dual6 ./body.json
abstract embodiments list --json
abstract embodiments get emb_0123456789abcdef --json
abstract datasets upload ./pick_cups --embodiment emb_0123456789abcdef
```

`body.json` contains the configuration itself (`state`, `action`, `video`, and optional tags),
not the registration wrapper. Creation validates it locally before sending a request.

To bind an upload, pass the account's `emb_` id as `embodiment` to `POST /v1/datasets`, or use
`--embodiment` in the CLI. The dataset retains that immutable reference. Before packing/uploading,
the CLI checks metadata against it; the API independently checks before creating an upload and
again before asking for a quote. State/action feature widths and declared video features must
match, paths must remain relative to the dataset, and `fps` must be 5, 10, 15 or 30. A bound v2.1
upload needs `episodes.jsonl` numbered from zero in file order. These are `422 invalid_dataset`
refusals with the offending field; missing/foreign bodies are `404 not_found`.

These checks validate **metadata declarations only**, not the uploaded archive or its video/table
contents. Legacy `ready` still means uploaded, not attested. Existing uploads retain their
previous behavior; hosted validation, when enabled, applies to newly created uploads.

## Mapping

Each model trains on a fixed set of values and views: its state, its action, and a camera for each of its image slots.
The check proposes a mapping from the dataset, and the job trains from it unless you send your own:

```json theme={"theme":"css-variables"}
{
	"state": ["observation.state"],
	"action": ["action"],
	"cameras": { "observation.images.top": "observation.images.scene_cam" }
}
```

* `state` and `action` are lists of columns, joined in order. A column can be cut to some of its values: `observation.state[0-5,13]` takes values 0 to 5, then 13.
* `cameras` maps each of the model's image slots to one of the dataset's cameras. A slot can be named in full (`observation.images.top`) or by its last part (`top`); so can a camera.
* The mapped state must be as wide as the model needs, and every slot it requires must have a camera. A mapping that does not fit answers with the field to fix.

Send it as `mapping` to the [check](#check-it-before-a-job), the [quote](https://docs.abstract.inc/fine-tuning/jobs#get-a-quote) and the job, or with `abstract finetune create --mapping mapping.json`.
On Platform, **Mapping** lists the proposal; each column and camera is a list to change.

## Auto-clean

Before training, each episode is judged from its data tables alone, and only the recording, never the demonstration: an awkward but genuine demonstration is kept.
The rules are relative to each joint's spread in the dataset (its 1st to 99th percentile), so they hold for radians, degrees and grippers alike.

| An episode is dropped when | Reason in the preview |
| - | - |
| It is too short for the model's training window | too short to train on |
| A value is NaN or infinite | NaN or infinite values |
| Its timestamps run backwards | timestamps run backwards |
| The robot moves on fewer than 10% of its frames | the robot barely moved |
| It repeats an earlier episode | repeats an earlier episode |
| Faults below would cut more than half of it | (the fault's reason) |

Inside the episodes it keeps:

* **Idle starts and ends are trimmed**, keeping half a second before the first motion and after the last. A frame counts as motion when some joint moves more than 2% of its spread over the next half second.
* **Faulty stretches are cut out**: stale state readings (the state frozen for a third of a second while the command moves on), one-frame glitches (an out-and-back jump far larger than the joint's usual step), and the frames around dropped frames.
* Videos are never re-encoded: only the frames the job trains on change.

The [check](#check-it-before-a-job) previews it on a Hugging Face dataset: the episodes it would drop and why, the idle time it would trim and the hours left.
Auto-clean is on for every job; send `"clean": false` (`--no-clean`, or the switch on Platform) to train on every frame as recorded.
With [Auto length](https://docs.abstract.inc/fine-tuning/jobs#length), the job trains for the frames left after cleaning, so it may run fewer steps than quoted, and is charged for those only.

## Upload a dataset

```sh theme={"theme":"css-variables"}
abstract datasets upload ./pick_cups
```

The command:

1. Checks that the folder has `meta/`, `data/` and `videos/`, and that `meta/info.json` says `codebase_version` `v2.1` or `v3.0`. With `--embodiment`, checks metadata against your registered body before packing. The job checks the archive contents.
2. Packs `meta/`, `data/` and `videos/` into an uncompressed tar, following symlinks and leaving out `._*` and `.DS_Store` files.
3. Hashes it, creates the dataset with the folder's `meta/` files, which a quote reads, then sends the archive in 8 MiB parts, each sent again for about two minutes when the network drops.
4. Prints the dataset's `ds_` id.

The dataset is named after the folder, in lowercase letters, digits and dashes; `--name` sets another.
`--part-size` sets the part size, from 5 to 64 MiB: smaller parts get through a connection that cuts long transfers, larger ones take fewer requests.
Platform's Training page lists processed uploads and legacy ready uploads to pick from.
The archive waits in a temporary folder until the upload completes, and goes when the command ends.
An upload that fails is deleted from your account, since an unfinished one counts against your space; run the same command again to start it over.
A dataset uploaded by a CLI before quotes has no `meta/` files on Abstract, so it cannot be quoted (`409 dataset_meta_missing`): upload it again.

| Limit | Value |
| - | - |
| One dataset | 20 GiB (`413 dataset_too_large`) |
| Its `meta/` files | 16 MiB, at most 512 files (`400 invalid_meta`) |
| Retained datasets per account, failed validations included | 50 GiB (`413 storage_full`) |

### Without the CLI

The upload is three calls. The archive is an uncompressed `.tar` of the dataset folder, with `meta/`, `data/` and `videos/` at its root or under one top folder.
It holds plain files and folders only; the job refuses links.

```sh theme={"theme":"css-variables"}
# 1. Create the dataset with its meta/ files, each path under meta/ and its base64.
#    The answer names part_bytes and parts; part_bytes may be asked for, 5 to 64 MiB (8 MiB if left out).
curl https://api.abstract.inc/v1/datasets \
  -H "Authorization: Bearer $(abstract token)" \
  -H "Content-Type: application/json" \
  -d '{"name": "pick-cups", "bytes": 1073741824, "sha256": "<64 hex>",
       "meta_files": {"info.json": "<base64>", "stats.json": "<base64>",
                      "tasks.parquet": "<base64>", "episodes/chunk-000/file-000.parquet": "<base64>"}}'

# 2. Send each part: part_bytes bytes, the last one the remainder. Keep each etag.
curl -X PUT https://api.abstract.inc/v1/datasets/ds_.../parts/1 \
  -H "Authorization: Bearer $(abstract token)" \
  --data-binary @part-1

# 3. Complete it with every part's etag.
curl https://api.abstract.inc/v1/datasets/ds_.../complete \
  -H "Authorization: Bearer $(abstract token)" \
  -H "Content-Type: application/json" \
  -d '{"parts": [{"part": 1, "etag": "..."}, {"part": 2, "etag": "..."}]}'
```

A part can be sent again; the last etag wins.
Completing checks the stored size against `bytes` (`400 upload_incomplete` otherwise).
Legacy completion keeps your declared `sha256`; it is not an archive attestation. With hosted
validation enabled, a private checker verifies the actual bytes as described below.

## Hosted validation

Hosted archive validation is **not enabled by default**. When enabled for new uploads, creation
requires an owned `embodiment` and LeRobot **v2.1** metadata. Uploads still use plain tar, not ZIP.
Completion queues the actual stored object for checking:

```text theme={"theme":"css-variables"}
uploading → ready_to_process → processing → processed
                                         ↘ failed
```

Only `processed` may be quoted or trained for an upload requiring validation. Until then, quote
and job creation return `409 dataset_not_processed`, before a quote request or credit hold. The
checker verifies the archive's size and SHA-256, actual metadata against the declared metadata,
Parquet vectors/columns/references, and every camera's H.264/AV1 MP4 sample tables. It does not
decode pictures or establish that a model can train on your data; model compatibility and the
training service's checks still apply. A local/client report cannot mark an upload processed.

Inspect the dataset, including `validation.error` on failure and `validation.report` on success:

```sh theme={"theme":"css-variables"}
curl https://api.abstract.inc/v1/datasets/ds_000000000000aaaa -H "Authorization: Bearer $(abstract token)"
curl -X POST https://api.abstract.inc/v1/datasets/ds_000000000000aaaa/retry -H "Authorization: Bearer $(abstract token)"
```

Retry uses the retained
archive under a new validation revision; repeating it while active or already processed returns
the current check. It starts no training and holds no credit. Fix invalid data by deleting and
uploading it again. Failed checks retain the archive and count against the account's storage
until deleted. Old worker results cannot revive a deleted or retried dataset.

| Refusal or validation error | What to do |
| - | - |
| `dataset_not_processed` | Wait, then inspect the dataset; retry a failed check. |
| `invalid_dataset` | Follow `validation.error.message`; correct the data and upload again. |
| `validation_unavailable` | The worker did not finish or lost its job; retry later. |
| `validation_protocol_error`, `validation_conflict` | Retry; report repeated failures. |
| `validation_not_retryable` | No retained validation failure/archive; upload again. |
| `dataset_metadata_changed` | Metadata differs from the checked archive; upload again. |

Existing `ready` uploads are not retrospectively attested and retain their old admission rules.
Upload again with your body to opt into the new checks. Disabling hosted checks does **not**
allow a new upload that requires validation to skip it.

## Check archive contents locally

On Linux, the source CLI can check a LeRobot **v2.1** folder, ZIP or plain tar against your body:

```sh theme={"theme":"css-variables"}
abstract datasets check ./pick_cups --embodiment emb_0123456789abcdef
abstract datasets check ./dataset.zip --embodiment emb_0123456789abcdef --json
```

The only API call retrieves your body. The checker runs locally through `uv`, with no API key
passed to it and no model call or charge. It checks the actual Parquet vectors and required
columns, metadata/episode/task references, every camera file, and H.264/AV1 MP4 sample tables.
It never decodes video frames. A valid container is not a guarantee that its pictures decode or
that a model can train on the dataset.

Unsafe archive paths, tar links/special files, missing cameras, mismatched vector widths and
unsupported codecs fail the check. Jobs are bounded and run in a child process; parser crashes
and timeouts fail that dataset. Strict checks require Linux memory limits and fail closed on
macOS or other unsupported platforms. v3.0 metadata preflight remains available, but this
archive checker does not validate v3.0 contents yet.

A local result does **not** mark an uploaded dataset processed or replace server-side checks of
the uploaded bytes. The API still accepts tar uploads only; ZIP support here is for local checks.

## Use a Hugging Face dataset

A public Hugging Face LeRobot dataset needs no upload:

```sh theme={"theme":"css-variables"}
abstract finetune create --dataset hf:allenai/19012026-block-04
abstract finetune create --dataset hf:allenai/19012026-block-04@main
```

After `@` comes a branch, a tag or a commit; without one the job reads `main`.
The job pins the revision to its commit when it starts, so it trains on one fixed version; the job's `dataset.commit` names it.
Abstract reads Hugging Face anonymously, so a private repository cannot be used.

### Find one

`GET /v1/fine_tuning/datasets/search?q=yam&limit=8` lists public LeRobot datasets on Hugging Face whose name holds `q`, most downloaded first.
Platform's Training page searches with it as you type.

```sh theme={"theme":"css-variables"}
curl "https://api.abstract.inc/v1/fine_tuning/datasets/search?q=yam&limit=3" \
  -H "Authorization: Bearer $(abstract token)"
```

```json theme={"theme":"css-variables"}
{
	"object": "list",
	"data": [
		{
			"id": "andlyu/Public-YAM-runs",
			"downloads": 18652,
			"likes": 2,
			"last_modified": 1793042293,
			"lerobot": true
		}
	]
}
```

* `q` is 2 to 100 letters, digits, spaces, dots, dashes, underscores or slashes (`400 invalid_request` otherwise). `limit` is 1 to 20, 8 by default.
* A dataset is listed when Hugging Face tags it `LeRobot` or `lerobot`. A full `owner/name` is also looked up by itself and comes first, tagged or not; its `lerobot` says whether it is tagged.
* Abstract asks Hugging Face anonymously, so gated and private datasets never appear. `last_modified` is in Unix seconds.
* When Hugging Face does not answer, the route answers `503 fine_tuning_unavailable`; name the dataset yourself.

### Check it before a job

`POST /v1/fine_tuning/datasets/check` reads a Hugging Face dataset's `meta/` and data tables (no video) and says what a job on it would find, for every model, before anything is held.
It takes seconds and is free.
Platform's Training page runs it when you name a dataset.

```sh theme={"theme":"css-variables"}
curl https://api.abstract.inc/v1/fine_tuning/datasets/check \
  -H "Authorization: Bearer $(abstract token)" \
  -H "Content-Type: application/json" \
  -d '{"huggingface": "allenai/19012026-block-04", "revision": "main"}'
```

```json theme={"theme":"css-variables"}
{
	"object": "fine_tuning.dataset_check",
	"huggingface": "allenai/19012026-block-04",
	"revision": "main",
	"commit": "9c1d0e7f3a2b4c5d6e7f8091a2b3c4d5e6f70812",
	"ok": true,
	"errors": [],
	"warnings": ["only 12 episodes; fine-tunes on fewer than 20 usually overfit"],
	"robot": "bimanual_yam",
	"version": "v3.0",
	"fps": 30,
	"robot_type": "bi_yam_follower",
	"episodes": 12,
	"frames": 10800,
	"hours": 0.1,
	"tasks": ["put the cups in the bin"],
	"episode_frames": { "min": 600, "median": 900, "max": 1200 },
	"vectors": [
		{ "key": "observation.state", "dim": 14, "names": ["left_joint_0.pos", "..."] },
		{ "key": "action", "dim": 14, "names": ["left_joint_0.pos", "..."] }
	],
	"cameras": [
		{ "key": "observation.images.top", "width": 640, "height": 360, "codec": "av1" },
		{ "key": "observation.images.left", "width": 640, "height": 360, "codec": "av1" },
		{ "key": "observation.images.right", "width": 640, "height": 360, "codec": "av1" }
	],
	"models": {
		"allenai/molmoact2": {
			"trains": true,
			"errors": [],
			"notes": [],
			"served": true,
			"auto_steps": 3000,
			"mapping": {
				"state": ["observation.state"],
				"action": ["action"],
				"cameras": {
					"observation.images.top": "observation.images.top",
					"observation.images.left": "observation.images.left",
					"observation.images.right": "observation.images.right"
				}
			}
		},
		"physical-intelligence/pi0.5": {
			"trains": true,
			"errors": [],
			"notes": [],
			"served": false,
			"auto_steps": 3000,
			"mapping": { "...": "..." }
		}
	},
	"clean": {
		"episodes": 12,
		"kept_episodes": 11,
		"dropped": { "the robot barely moved": 1 },
		"frames": 10800,
		"kept_frames": 9420,
		"trimmed_seconds": 31.5,
		"dropped_seconds": 30,
		"kept_hours": 0.09
	}
}
```

* `ok` is `true` when the dataset itself passes and at least one model trains it. `errors` are the dataset's own findings; each model's `errors` say why it does not train it.
* `served` says whether Abstract serves that model's fine-tune of this robot; `auto_steps` is [Auto's](https://docs.abstract.inc/fine-tuning/jobs#length) length before cleaning.
* `mapping` is the [mapping](#mapping) proposed for each model. Send `"mapping"` with the request to check your own.
* `clean` is [auto-clean's](#auto-clean) preview.
* `commit` is the commit `revision` (or `main`) names now; a job pins its own when it starts.

A repository that does not exist, or is private, answers `404 dataset_not_found`.
An upload has no such check: [its quote](https://docs.abstract.inc/fine-tuning/jobs#get-a-quote) checks it for the model you choose.

## Manage datasets

| To | Run |
| - | - |
| List them | `abstract datasets list`, or `GET /v1/datasets` |
| Read one | `GET /v1/datasets/{id}` |
| Retry a failed hosted check | `POST /v1/datasets/{id}/retry` |
| Delete one | `DELETE /v1/datasets/{id}` |

```sh theme={"theme":"css-variables"}
curl -X DELETE https://api.abstract.inc/v1/datasets/ds_... -H "Authorization: Bearer $(abstract token)"
```

A dataset's `status` is `uploading`, `ready` or `failed` (its upload completed at the wrong size; create it again). A job takes a `ready` one only (`400 dataset_not_ready`).
Deleting an unfinished upload abandons it; deleting a ready dataset removes the archive and its `meta/` files.
A delete answers `deleted`, or `deleting` while storage has not yet removed the archive; Abstract retries that until it is gone, and you may send the delete again.
A deleted dataset leaves the list, and its id answers `404 dataset_not_found`.
A job that already trained on it keeps its own copy in Abstract's training storage, which deleting the dataset does not remove.
A dataset a live job uses cannot be deleted (`409 dataset_in_use`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.