Skip to main content

Sublinear Python SDK

The official Python client for submitting robot videos and trajectories to Sublinear foundation reward models.

Installation

pip install sublinear-sdk

The PyPI distribution is named sublinear-sdk, while the Python import package is named sublinear:

from sublinear import Sublinear

Quick start

Create an API key from the Sublinear dashboard, then submit a local MP4 video:

import os
from sublinear import Sublinear
client = Sublinear(api_key=os.environ["SUBLINEAR_API_KEY"])
response = client.responses.create(model="sole-r1", task_description="Fold the clothing.", video_path="episode.mp4")
print(response.rewards)
print(response.success)

You can also provide RGB video frames directly as a list or NumPy array with shape (frames, height, width, 3):

import os
import numpy as np
from sublinear import Sublinear
client = Sublinear(api_key=os.environ["SUBLINEAR_API_KEY"])
video_frames = np.load("video_frames.npy")
response = client.responses.create(model="robometer", task_description="Fold the clothing.", video_frames=video_frames)
print(response.rewards)
print(response.success)

Multiple videos

Pass video_paths to process multiple videos. The SDK submits jobs concurrently, up to max_parallel_jobs at a time.

import os
from sublinear import Sublinear
client = Sublinear(api_key=os.environ["SUBLINEAR_API_KEY"], max_parallel_jobs=8)
response = client.responses.create(model="sole-r1", task_description="Pick up the cube.", video_paths=["episode_1.mp4", "episode_2.mp4"])
print(response.rewards)
print(response.success)

Available models

  • sole-r1 — reasoning-based robot trajectory evaluation
  • robometer — dense task-progress reward estimation
  • topreward — visual reward estimation across robot tasks
  • roboreward — general-purpose robot reward prediction

Documentation

Full documentation and additional input formats are available at sublinear.dev/docs.

Package layout

This project uses a src layout:

sublinear-sdk/
├── pyproject.toml
├── README.md
└── src/
    └── sublinear/
        ├── __init__.py
        └── core.py

Your src/sublinear/__init__.py should expose the public client:

from .core import Sublinear
__all__ = ["Sublinear"]

Development

Install the package locally in editable mode:

python -m pip install -e .

Build the source distribution and wheel:

python -m pip install --upgrade build
python -m build

Before publishing, verify the package metadata and archives:

python -m pip install --upgrade twine
python -m twine check dist/*

Publish to PyPI:

python -m twine upload dist/*

License

MIT

Release files for sublinear-sdk 0.0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sublinear-sdk 0.0.0.2
File Size Uploaded
sublinear_sdk-0.0.0.2.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sublinear-sdk 0.0.0.2
File Interpreter ABI Platform
sublinear_sdk-0.0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / sublinear_sdk-0.0.0.2.tar.gz

Download URL sublinear_sdk-0.0.0.2.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9b170964c20b036c00c7fb88bc39f8b75a5fb64142432c324f262524d360a35a
BLAKE2b-256 checksum
How to use checksums
6fffdb2bf2a166c1f161bef2ac6b932b8c3a7d37d6f4e0036ff07be767b1857a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / sublinear_sdk-0.0.0.2-py3-none-any.whl

Download URL sublinear_sdk-0.0.0.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dde41c6ab9c3ce3b3d1a5ad54bfbf9ee26d9142a5ebc29ac6492ba52c9295a43
BLAKE2b-256 checksum
How to use checksums
77253ec0367a900c22dd4e9e760c15efe7b8c2b62a3b482ccdcc36542fdee088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

0.0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page