Overview
The ResonTech Python SDK is a thin wrapper around the same REST + S3 APIs the web wizard uses. It renders the FL configs in memory, uploads your scripts and shards directly to your bucket, and submits the job — no SSH, no SFTP, no local temp dirs.
Git hub sample
The SDK is task-agnostic: it does not assume a specific task, dataset format, loss, or optimizer. You write your model and a one-round training function; the SDK ships them to every worker and plumbs global weights in/out of the federation.
Job returned from rt_submit carries a dashboard_url you can open to follow along.1. Provision a Storage Bucket (once)
Every user gets one S3-compatible bucket in the platform's Garage cluster. You must provision it before the SDK can upload anything.
- Log in to the web dashboard.
- Open Profile → Storage.
- Click Provision Bucket, pick an alias (lowercase alphanumeric + hyphens, 3–30 chars), and a quota in GB.
- Copy the
accessKeyIdandsecretAccessKeyshown.
2. Get the SDK
The Python SDK is distributed privately to ResonTech customers — it is not on PyPI and there is no public download. Your account contact provides access to the package. Once you have it, install it into your Python environment in the standard way for your distribution channel.
Requirements on the client side: Python 3.11+. The SDK pulls in httpx and boto3 as dependencies — nothing else. PyTorch is required on the worker side (the FL workflow operates on PyTorch state dicts), but you do not need it locally just to submit a job.
3. Configure the Client
Every field is documented in the Configuration reference.
4. Log In
sdk.login():
- Authenticates against the REST API and stores the JWT.
- Resolves your bucket alias from
GET /api/users/storage/bucketif you didn't sets3_bucket_aliasexplicitly. - Raises
StorageErrorif no bucket has been provisioned yet — the message tells you to visit Profile → Storage in the web UI.
5. Check the Cluster (optional)
Make sure there's free VRAM before submitting:
6. Define Your Model
Define your model class and an fl_train function in the same module (or notebook cell). The SDK extracts the file/cell verbatim and ships it as model_def.py.
import statements in the same cell as the class. The SDK extracts imports from the same cell — anything outside that cell does not travel.7. Describe Training & Federation
Anything the typed fields don't cover (mixup, weight decay, custom schedulers, …) goes into TrainingConfig.extra. See the hyperparameters reference.
8. Submit
What the call does
- Renders the three FL configs + the three Python scripts (
model_def.py,custom_client_executor.py,custom_persistor.py) in memory. - Writes them to
s3://<your-bucket>/jobs/<slug>/alongsiderequirements.txt. - Streams each shard zip directly from your disk (multipart for files ≥ 10 MB, 5 concurrent parts).
- Calls
POST /api/taskswith the five S3 paths. - Prints a tracking URL and returns a thin
Jobhandle.
9. Track Progress
The SDK hands off to the web dashboard at this point. Open job.dashboard_url to watch the FL round counter, browse the full workspace, download the final model, and view worker logs.
Prefer to stay in Python? sdk.storage.list("jobs/<name>/") and sdk.storage.presign_get(key) give you read access to the same files without opening the UI. See Job lifecycle.