Create a job¶
Upload a zip, grade it, and save the report, in one go. The simplest way from a zip to a report. It's the same script as the Python sample on the dashboard's API tab.
create_job.py
# create_job.py - upload a zip, grade it, and save the report
import os
from centific import PhysicalAI
client = PhysicalAI(
api_key = os.environ["CENTIFIC_API_KEY"],
base_url = "https://humanoidiq-dev.centific.com",
)
job = client.qc.create(
dataset = "./episode_0000.zip", # <- change this
data_type = "egocentric", # <- change this
task = "Folding laundry and placing it on a bed", # <- change this
)
print("job id:", job.id) # your receipt - keep it
print("status:", job.status)
# Wait here until grading finishes (checks once a minute).
report = job.wait()
print("verdict:", report.verdict, " score:", report.score)
for area in report.areas:
if area["assessed"]: # skip areas that don't apply
print(f" {area['label']:<16} {area['fail']} failed")
job.save_pdf(f"{job.id}.pdf")
print("PDF saved:", f"{job.id}.pdf")
How to use it¶
- Change
datasetto the path of your zip. On Windows use forward slashes ("C:/Users/me/Downloads/batch.zip") or a raw string (r"C:\Users\me\Downloads\batch.zip"). - Set
data_typeandtask(see Prepare your data). -
Run it:
The job id prints as soon as the upload finishes. The script then waits until grading is done, which can take a while for big zips.
You can stop waiting at any time
Press Ctrl+C. The job carries on, and you can pick it up later with Wait until finished or Get the report & PDF.
Sample output¶
Illustrative: your verdict, score and areas depend on your data.
uploaded episode_0000.zip: 202.5 MiB in 62s (3.2 MiB/s)
job id: qcjob_yLrQuj9XZ2LxIBbVN6f8S2
status: queued
verdict: PASS score: 87
Video quality 0 failed
Framing 0 failed
Hand tracking 1 failed
Movement 0 failed
Task completion 0 failed
PDF saved: qcjob_yLrQuj9XZ2LxIBbVN6f8S2.pdf
While the upload runs, a progress bar redraws in place:
Only the final uploaded … line stays on screen.
If the job ends failed or cancelled
job.wait() stops with an error naming the reason, for example:
See Troubleshooting for what each reason means.