Calibration tasks and results
Data models
The Calibration types describe the computation progress per target and provide a snapshot of the entire Session and the final result.
CalibrationJobFailure
CalibrationJobFailure appears as CalibrationJobProgress.failure, using a stable code and a readable message to describe the calibration failure reason of a certain target.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
code | str | No | Stable failure code |
message | str | No | Failure description for display or logging |
CalibrationJobProgress
CalibrationJobProgress appears as an element of CalibrationProgress.job and CalibrationSessionSnapshot.jobs, used to view the calibration state and failure information of a single target.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
target_id | str | No | Target identifier |
state | CalibrationJobState | No | The calibration state of the current target |
failure | CalibrationJobFailure | None | Yes | Failure information of the current target |
CalibrationProgress
CalibrationProgress is published by device.calibration_progress() and is used by the external interaction interface to continuously display the computation state of one target in the current Calibration Session.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
session_id | str | No | Calibration Session identifier |
source_id | str | No | The source ID used for calibration |
job | CalibrationJobProgress | No | Calibration progress of the current target |
CalibrationSessionSnapshot
CalibrationSessionSnapshot is returned by CalibrationSession.snapshot() and is used to view the current state of the entire Session and all of its targets at once.
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
state | CalibrationSessionState | No | Session state |
jobs | tuple[CalibrationJobProgress, ...] | No | Task states arranged in the order of targets |
CalibrationResult
CalibrationResult is a single target result in the calibration result collection, used to record the record ID, source, target and creation time of a saved calibration. CalibrationSession.result() returns tuple[CalibrationResult, ...] | None, and wait() returns tuple[CalibrationResult, ...].
Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
record_id | str | No | The calibration record identifier after saving |
source_id | str | No | The source ID used for calibration |
target_id | str | No | The target ID corresponding to the calibration |
created_at | float | No | Calibration result creation time in milliseconds; new results use the current Glove time reference |
The values of both CalibrationSessionState and CalibrationJobState are RUNNING, COMPLETED, FAILED, CANCELLED, among which CalibrationJobState also includes PENDING, which is waiting to execute.