Client¶
The main entry point for the Canard SDK.
Constructor¶
Client(
api_url: str,
api_key: str | None = None,
dashboard_url: str | None = None,
s3_results_bucket: str = "isaac-sim-results",
s3_tensorboard_bucket: str = "isaac-sim-tensorboard",
aws_region: str = "us-east-1",
)
| Parameter | Type | Default | Description |
|---|---|---|---|
api_url |
str |
required | Canard API base URL (https://api.canard.cloud) |
api_key |
str |
None |
API key. If omitted, loaded from env/file |
dashboard_url |
str |
None |
Dashboard URL (auto-derived from api_url) |
s3_results_bucket |
str |
"isaac-sim-results" |
S3 bucket for results |
s3_tensorboard_bucket |
str |
"isaac-sim-tensorboard" |
S3 bucket for TB logs |
aws_region |
str |
"us-east-1" |
AWS region |
Can be used as a context manager:
submit_training_run¶
client.submit_training_run(
name: str,
task_name: str = "Template-G1-Training-Direct-v0",
code_url: str,
num_envs: int = 1000,
max_iterations: int = 1500,
enable_video: bool = False,
video_interval: int = 2000,
seed: int | None = None,
checkpoint_url: str | None = None,
code_ref: str | None = None,
gpu_count: int = 2,
wait: bool = False,
) -> RunHandle
Submit a single RL training run. Returns a RunHandle for monitoring.
Prints estimated cost and dashboard URL on submission.
If wait=True, blocks until the run completes.
submit_training_sweep¶
client.submit_training_sweep(
name: str,
task_name: str = "Template-G1-Training-Direct-v0",
code_url: str,
sweep_params: dict[str, list] | None = None,
num_envs: int = 1000,
max_iterations: int = 1500,
enable_video: bool = False,
seed: int | None = None,
code_ref: str | None = None,
gpu_count: int = 2,
wait: bool = False,
**training_kwargs,
) -> RunHandle
Submit a hyperparameter sweep. Creates one task per parameter combination.
sweep_params is a dict mapping parameter names to lists of values:
sweep_params={"learning_rate": [1e-4, 3e-4], "entropy_coef": [0.01, 0.05]}
# Creates 2 x 2 = 4 tasks
Additional PPO kwargs (e.g., gamma=0.99) are applied to all tasks.
submit_run¶
Submit a run with a raw config dict or RunConfig object. Lower-level alternative to submit_training_run.
get_run¶
Fetch a run by its slug identifier.
Raises: RunNotFoundError if the slug doesn't exist.
list_runs¶
List all runs for the authenticated user.
get_run_metrics¶
Get aggregated metrics for a run (reward, FPS, success rate, training progress).
get_run_tasks¶
Get all tasks for a run, including their status, parameters, and metrics.
list_artifacts¶
List artifacts for a run. Optionally filter by type ("checkpoint", "video", "tensorboard", "policy", "summary").
get_artifact_url¶
Get a presigned HTTPS download URL for an artifact.
download_artifact¶
Download an artifact to a local directory. Returns the local file path.
get_queue_status¶
Get platform queue and worker status.
close¶
Close the HTTP client connection. Called automatically when using with Client(...) as client:.