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

The PyPI distribution is named sublinear, 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/
├── 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

Metadata

Release files for sublinear 0.2.3

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 0.2.3
File Size Uploaded Provenance Actions
sublinear-0.2.3.tar.gz 34.5 kB Without provenance Details for sublinear-0.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 65.0 kB

Release files / sublinear-0.2.3.tar.gz

Download URL sublinear-0.2.3.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
154e46d23eceade69a2f104c1d1334e97d555bc1ffc8307b08344d60548ba1da
BLAKE2b-256 checksum
How to use checksums
ddd89f9eefcaf47b395a3377e6133546306cbb5afcd8dce6c3ccf56354c27b3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / sublinear-0.2.3-py3-none-any.whl

Download URL sublinear-0.2.3-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d98e764e6fd069e05696719e8d0a663a2df2905292252a67949dfed67a63f6d4
BLAKE2b-256 checksum
How to use checksums
505088433e529cebe062c30f76961f4de1d745cf4e8bc98f21f7c984828031d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for sublinear 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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