# Octo: Configured policy fine-tuning

Pinned Octo fine-tuning entrypoint that loads a configured pretrained policy and trains it with selected target-domain data and fine-tuning settings. Statically reviewed source only; not run and no Hub preparation adapter.

ID: `octo-scripts-finetune-py`

Record version: `source-76e6c7520947a2b2e32d2dd1cd227fc455f4b2205c00a25bf59772a6b72151d0`

Hub commit: `66a13cd6ae8ab828219a4916587fb83d6dc71809`

## Access

Fetch the pinned repository, verify this source checksum, and use upstream installation and invocation. This record does not install or execute code.

Optional inert file retrieval: `python /PATH_TO_SKILL/scripts/rsh.py fetch-source octo-scripts-finetune-py --expected-source-revision 241fb3514b7c40957a86d869fecb7c7fc353f540 --expected-source-sha256 76e6c7520947a2b2e32d2dd1cd227fc455f4b2205c00a25bf59772a6b72151d0 --project ./experiment --json`. This verifies one file, preserves provenance and never installs or runs it. See [source-file retrieval](https://hub.superfastrobotics.com/source-files.md).

Hub preparation adapter: **false**. Runtime verification: **not_run**.

Upstream setup: https://github.com/octo-models/octo/blob/241fb3514b7c40957a86d869fecb7c7fc353f540/README.md

## Source and license

- Repository: https://github.com/octo-models/octo
- Pinned source: https://github.com/octo-models/octo/blob/241fb3514b7c40957a86d869fecb7c7fc353f540/scripts/finetune.py
- Revision: `241fb3514b7c40957a86d869fecb7c7fc353f540`
- Path: `scripts/finetune.py`
- Source SHA256: `76e6c7520947a2b2e32d2dd1cd227fc455f4b2205c00a25bf59772a6b72151d0`
- Source bytes: 12544
- Original authors: Octo Model Team, Robotic AI & Learning Lab Berkeley
- License: [MIT](https://github.com/octo-models/octo/blob/241fb3514b7c40957a86d869fecb7c7fc353f540/LICENSE)
- License scope: Selected first-party Python workflow source only. Preserve upstream copyright and per-file notices. Model weights, datasets, third-party code, robot drivers/firmware and services retain separate terms; no rights for those assets are inferred.

License SHA256: `8c891a7dd06fdaa873aa011ff0b2773a3ccfe6d123f6b9a9fc589db718aec1d1`

## Artifact

```json
{
  "kind": "workflow",
  "format": "python",
  "workflow_role": "policy-training"
}
```

## Requirements

```json
{
  "python": "Python3.10 in README setup; no packaging minimum asserted.",
  "packages": [
    "Pinned Octo checkout",
    "JAX0.4.20, Flax0.7.5 and TensorFlow2.15.0 from requirements.txt",
    "Per-example simulator/robot-controller dependencies and reviewed checkpoints/data"
  ],
  "display": "Hardware: Uses JAX devices, sharding and device-count divisibility checks. README supplies GPU/TPU setup. No per-workflow GPU-memory minimum or CPU validation is declared. Weights: Requires configured pretrained_path, loaded with OctoModel.load_pretrained; README examples use separately hosted Octo checkpoints. Datasets: Requires selected target-domain dataset settings. Data names and observation/action definitions remain configuration-specific. Services/auth: Initializes W&B; --debug is documented as no W&B logging. Authentication method/key variable is not specified in the selected file.",
  "execution_domain": "computation",
  "source_imports": [
    "absl",
    "datetime",
    "flax",
    "flax.traverse_util",
    "functools",
    "jax",
    "jax.sharding",
    "jax_smi",
    "ml_collections",
    "octo.data.dataset",
    "octo.model.octo_model",
    "octo.utils.jax_utils",
    "octo.utils.spec",
    "octo.utils.train_callbacks",
    "octo.utils.train_utils",
    "optax",
    "os",
    "tensorflow",
    "tqdm",
    "wandb"
  ],
  "notes": "This configurable full script and the separate didactic observation/action adaptation example remain distinct source documents; neither represents a new policy behavior claim. Code licensing does not establish model, checkpoint, dataset or service permission.",
  "declared_requirements": {
    "python": "Python3.10 in README setup; no packaging minimum asserted.",
    "weights": "Requires configured pretrained_path, loaded with OctoModel.load_pretrained; README examples use separately hosted Octo checkpoints.",
    "datasets": "Requires selected target-domain dataset settings. Data names and observation/action definitions remain configuration-specific.",
    "hardware": "Uses JAX devices, sharding and device-count divisibility checks. README supplies GPU/TPU setup. No per-workflow GPU-memory minimum or CPU validation is declared.",
    "external_services_and_auth": "Initializes W&B; --debug is documented as no W&B logging. Authentication method/key variable is not specified in the selected file.",
    "evidence": [
      {
        "anchor": "OctoModel.load_pretrained",
        "line": 129
      },
      {
        "anchor": "Debug config (no wandb logging)",
        "line": 46
      },
      {
        "anchor": "Mesh(jax.devices()",
        "line": 92
      }
    ],
    "license_scopes": {
      "code": "MIT for selected first-party workflow source.",
      "weights": "README links separately hosted rail-berkeley Octo checkpoints. This bounded repository review did not inspect model cards or establish a weight license; repository MIT is limited to selected code.",
      "datasets": "README references Open X-Embodiment and an example ALOHA simulation dataset. Their individual terms were not inspected and are not covered by the code-license assertion.",
      "third_party_code": "External dependencies retain their own licenses."
    },
    "interpretation": "Pinned upstream declarations only; no dependency resolution, model/data access, compatibility inference or runtime validation was performed."
  }
}
```

## Invocation

```json
{
  "entrypoint": "python scripts/finetune.py --config.pretrained_path=<approved-checkpoint> <reviewed-data-and-save-settings>",
  "notes": "This configurable full script and the separate didactic observation/action adaptation example remain distinct source documents; neither represents a new policy behavior claim."
}
```

## Compatibility

```json
[]
```

Missing environment fields remain unknown. Source discovery labels do not establish robot compatibility.

## Evidence

Level: **source_reviewed**. Runtime verification: **not_run**.

Verified exact source, applicable license and author/setup document bytes at a full Git commit; parsed the Python AST and reviewed this guarded operational entrypoint and its explicit license notices. No upstream code, installation, robot command, dataset, mesh or checkpoint was executed or loaded.

Source review and contributor reports do not establish task completion. Preserve upstream attribution and licenses.
