braket.task_result.task_metadata_v1 module

class braket.task_result.task_metadata_v1.TaskMetadata[source]

Bases: braket.schema_common.schema_base.BraketSchemaBase

The task metadata schema.

braketSchemaHeader

Schema header. Users do not need to set this value. Only default is allowed.

Type

BraketSchemaHeader

id

The ID of the task. For AWS tasks, this is the task ARN.

Type

str

shots

The number of shots for the task

Type

str

deviceId

The ID of the device on which the task ran. For AWS devices, this is the device ARN.

Type

str

deviceParameters

The device parameters of the task. Default is None. # TODO: replace with device schema

Type

Dict[str, Any]

createdAt

The timestamp of creation; the format must be in ISO-8601/RFC3339 string format YYYY-MM-DDTHH:mm:ss.sssZ. Default is None.

Type

str

endedAt

The timestamp of when the task ended; the format must be in ISO-8601/RFC3339 string format YYYY-MM-DDTHH:mm:ss.sssZ. Default is None.

Type

str

status

The status of the task. Default is None.

Type

str

failureReason

The failure reason of the task. Default is None.

Type

str

Examples

>>> TaskMetadata(id="task_id", shots=100, deviceId="device_id")

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

braketSchemaHeader: BraketSchemaHeader = None
id: constr(min_length=1) = None
shots: conint(ge=0) = None
deviceId: constr(min_length=1) = None
deviceParameters: Optional[Dict[str, Any]] = None
createdAt: Optional[constr(min_length=1, max_length=24)] = None
endedAt: Optional[constr(min_length=1, max_length=24)] = None
status: Optional[constr(min_length=1, max_length=20)] = None
failureReason: Optional[constr(min_length=1)] = None