- Resource: Operator
- OperatorDefinition
- ArgumentDefinition
- AttributeDefinition
- ResourceSpecification
- Methods
Resource: Operator
Message describing the Operator object.
JSON representation |
---|
{
"name": string,
"createTime": string,
"updateTime": string,
"labels": {
string: string,
...
},
"operatorDefinition": {
object ( |
Fields | |
---|---|
name |
Name of the resource. |
createTime |
Output only. The create timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The update timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
Labels as key value pairs. An object containing a list of |
operatorDefinition |
The definition of the operator. |
OperatorDefinition
Defines the interface of an Operator.
Arguments to an operator are input/output streams that are getting processesed/returned while attributes are fixed configuration parameters.
JSON representation |
---|
{ "operator": string, "inputArgs": [ { object ( |
Fields | |
---|---|
operator |
The name of this operator. Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, PetDetector1. |
inputArgs[] |
Declares input arguments. |
outputArgs[] |
Declares output arguments. |
attributes[] |
Declares the attributes. |
resources |
The resources for running the operator. |
ArgumentDefinition
Defines an argument to an operator.
Used for both inputs and outputs.
JSON representation |
---|
{ "argument": string, "type": string } |
Fields | |
---|---|
argument |
The name of the argument. Tentatively [_a-z0-9]*[a-z0-9]?, e.g., video, audio, high_fps_frame. |
type |
The data type of the argument. This should match the textual representation of a stream/Packet type. |
AttributeDefinition
Defines an attribute of an operator.
JSON representation |
---|
{
"attribute": string,
"type": string,
"defaultValue": {
object ( |
Fields | |
---|---|
attribute |
The name of the attribute. Tentatively [_a-z0-9]*[a-z0-9]?, e.g., max_frames_per_video, resize_height. |
type |
The type of this attribute. See attribute_value.proto for possibilities. |
defaultValue |
The default value for the attribute. |
ResourceSpecification
ResourceSpec collects a set of resources that can be used to specify requests and requirements.
Note: Highly experimental as this can be runtime dependent. Can use the "extras" field to experiment first before trying to abstract it.
JSON representation |
---|
{ "cpu": string, "memory": string, "gpus": integer, "latencyBudgetMs": integer } |
Fields | |
---|---|
cpu |
CPU specification. Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus. Leave empty to let the system decide. Note that this does not determine the cpu vender/make, or its underlying clock speed and specific SIMD features. It is only the amount time it requires in timeslicing. |
memory |
Memory specification (in bytes). Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. Leave empty to let the system decide. |
gpus |
Number of gpus. |
latencyBudgetMs |
The maximum latency that this operator may use to process an element. If non positive, then a system default will be used. Operator developers should arrange for the system compute resources to be aligned with this latency budget; e.g. if you want a ML model to produce results within 500ms, then you should make sure you request enough cpu/gpu/memory to achieve that. |
Methods |
|
---|---|
|
Creates a new Operator in a given project and location. |
|
Deletes a single Operator. |
|
Gets details of a single Operator. |
|
Lists Operators in a given project and location. |
|
Updates the parameters of a single Operator. |