Python SDK
Launching Your First Run
Step-by-step walkthrough using the RunRL Python SDK.
Launching Your First Run
This guide uses the RunRLClient
to upload assets, launch a run, and monitor completion. It mirrors the flows exposed in the RunRL web UI but keeps everything scriptable.
Prerequisites
- SDK installed and configured (see Installation & Setup).
- Prompt dataset stored as JSONL lines.
- Reward function defined in Python with a
reward_fn(completion, **kwargs)
signature.
1. Upload Artifacts
2. Launch the Run
client.runs.create
returns a RunRLPollingFuture
. The initial run payload is available immediately; call .result()
to wait for terminal status.
Async variant
3. Monitor Progress
To stream logs incrementally:
4. Cancel When Needed
This will also stop the future from polling—future.cancel()
internally calls the same endpoint.
5. Clean Up
Files and runs are soft-deleted by default. Permanently removing a file requires force=True
:
Ready for more? Browse the API Reference or copy a complete example from the Examples gallery.