Skip to main content

Hardsim Python SDK

Project description

Hardsim SDK (v0)

Phase 1 SDK goals:

  • submit(...) / run(...) to create cloud simulation jobs
  • step(...) alias for cloud-routed environment steps
  • status(...), wait(...), and download(...) for lifecycle + artifacts
  • cancel(...) for queued/running jobs
  • upload_input(...) helper for local URDF/USD -> S3
  • Retries + typed exceptions for robust client behavior

Install from PyPI:

pip install hardsim

Install (editable during development):

pip install -e ./sdk
# optional upload helper dependencies:
pip install -e "./sdk[s3]"

Release process is documented in docs/sdk-release.md.

3-line usage:

import hardsim as hs

job = hs.submit(robot="s3://bucket/franka.urdf", scene="table_top_v0", num_envs=64, steps=2000)
hs.wait(job.job_id)
paths = hs.download(job.job_id, "./outputs")

Environment variables:

  • HARDSIM_API_KEY (required)
  • HARDSIM_API_URL (default http://localhost:8000)
  • HARDSIM_HTTP_TIMEOUT_S (default 30)
  • HARDSIM_HTTP_RETRIES (default 3)
  • HARDSIM_HTTP_BACKOFF_S (default 0.5)
  • HARDSIM_INPUT_S3_BUCKET (required for upload_input(...) when destination URI is not passed)
  • HARDSIM_INPUT_S3_PREFIX (default hardsim/inputs)
  • HARDSIM_INPUT_S3_REGION / HARDSIM_INPUT_S3_ENDPOINT_URL (optional)

Idempotent create (recommended for client retries):

job = hs.step(
    robot="s3://bucket/franka.urdf",
    scene="table_top_v0",
    num_envs=64,
    steps=2000,
    idempotency_key="train-run-42-shard-0001",
)

Local file upload helper:

import hardsim as hs

client = hs.HardsimClient.from_env()
robot_uri = client.upload_input("./assets/franka.urdf")
job = client.submit(robot=robot_uri, scene="table_top_v0", num_envs=64, steps=2000)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hardsim-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hardsim-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file hardsim-0.1.0.tar.gz.

File metadata

  • Download URL: hardsim-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hardsim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de4cc8c92af7c6510afe116b011f2e105c2e39e961bd18ca7e65990ef7e04c08
MD5 534e5922a3f1ed2690b14f1650f08999
BLAKE2b-256 836ede5a10727ff091230158dcd227c9e34e3fbeebe5888ad6053a8622af6529

See more details on using hashes here.

File details

Details for the file hardsim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hardsim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hardsim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 699c5170b6f51e1a41285d144afaefea60b7cbfe6aed43c06a0492551a665457
MD5 63ec470096cf76cb777ca6318c659b8f
BLAKE2b-256 7ee1f920c81996c298accfef9174ea25d8f0cc3095453fba3a77f08e5d87fc07

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page