Skip to content
SynthGraph
Developers

Instrument your research in Python.

The SDK is called from the generator and training code you already run, and sends structured records to the API over HTTPS. A command line tool reads them back.

shell
$ pip install "git+https://github.com/Abinash-Anand/SynthGraph.git#subdirectory=synthgraph-sdk-cli"
Read the docsGitHubSDK 1.0.0 · alpha
  • 01

    Install

    The SDK needs Python 3.11+. The version on PyPI is behind the repository, so for now install the current 1.0.0 straight from GitHub.

    shell
    $ pip install "git+https://github.com/Abinash-Anand/SynthGraph.git#subdirectory=synthgraph-sdk-cli"
  • 02

    Configure

    Credentials come from the environment, never from code. Create an API key in the dashboard under Settings, then point the SDK at your backend: the hosted one or your own.

    shell
    $ export SYNTHGRAPH_API_KEY="..."$ export SYNTHGRAPH_API_URL="https://your-synthgraph-backend"
  • 03

    Record

    A few lines around the code you already have. The with block starts and finishes the generation for you, and marks it failed if your code raises. A training run is started and completed with explicit calls. Your dataset stays where it is: SynthGraph stores the reference, not the bytes.

    capture.py
    from synthgraph import SynthGraph with SynthGraph() as sg:  # reads the two environment variables above    project = sg.project("Adverse weather detection")    experiment = project.experiment("vehicle_detection_rain")     with experiment.generation(        generator="blender",        generator_version="4.2",        parameters={"weather": "rain", "occlusion": 0.3, "camera_distance": 12},        seed=42,    ) as generation:        run_my_blender_pipeline()  # your code, unchanged         dataset = generation.dataset(            name="rain_dataset_v1",            uri="s3://lab-bucket/rain_dataset_v1",            format="image",        )     training = experiment.training(        model="yolo",        framework="pytorch",        dataset=dataset,        config={"epochs": 50, "batch_size": 32, "learning_rate": 0.001},    )    training.start()    training.log_metric(step=1, metrics={"loss": 0.9})    training.evaluation(        metrics={"mAP": 0.724, "precision": 0.78, "recall": 0.69},        dataset_version_id=dataset,    )    training.complete()
  • 04

    Inspect from the command line

    The same data, from a terminal. Every command can print JSON for scripts.

    shell
    $ synthgraph projects list$ synthgraph experiments list --project <project-id>$ synthgraph training-runs get <training-run-id>$ synthgraph manifest <generation-id>     # the reproduction manifest$ synthgraph docs <generation-id>         # generated Markdown documentation

Reliability

What the client does when the network does not.

  • Reads are retried

    GET requests are retried with exponential backoff on connection failures, timeouts and 408, 429 and 5xx responses.

  • Writes are never retried blindly

    The API has no idempotency key yet, so repeating a create call could duplicate a record. A write that fails in transit raises an error that says its outcome is unknown, instead of pretending it saved.

  • Backend validation

    The API decides what a valid record is. The SDK checks what it can before a request leaves, so a rejected call leaves nothing behind.

  • Typed models

    Responses are typed models, not loose dictionaries, and errors form one hierarchy you can catch.

  • Opt-in capture

    Hashing your data, reading git state, recording the environment and sampling resources only happen when you ask.

  • Your key stays private

    The API key is never logged, never written into a model or a manifest, and never placed in an error message.

Framework helpers

Helpers turn objects you already have into the configuration SynthGraph records. Nothing is imported or patched unless you call it. There are no plugins for Blender, Unity or Omniverse: your script calls the SDK.

  • stable-baselines3

    Extracts configuration and logs metrics automatically through a callback

  • skrl

    Extracts configuration and logs metrics automatically through a writer

  • rl_games

    Extracts algorithm, model and network configuration

  • Isaac Lab

    Extracts domain-randomization event-term configuration

  • MuJoCo Playground

    Extracts environment configuration and the domain-randomize source

  • Weights & Biases

    Reads configuration and summary from an existing run

Current status

The SDK is at version 1.0.0, an alpha. It is open source under the MIT license, it is not a finished v1.0 release, and the surface can still change.

Open source · MIT

Your next experiment should leave a trail.

Install the SDK and record your next generation. The next time someone asks which seed, you will already have the answer.

SDK 1.0.0 is an alpha: the API only changes by adding, and the SDK can still change. See the docs for what it does and what it does not do.