REST Resource: projects.locations.operators

Resource: Operator

Message describing the Operator object.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "operatorDefinition": {
    object (OperatorDefinition)
  }
}
Fields
name

string

Name of the resource.

createTime

string (Timestamp format)

Output only. The create timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The update timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Labels as key value pairs.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

operatorDefinition

object (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 (ArgumentDefinition)
    }
  ],
  "outputArgs": [
    {
      object (ArgumentDefinition)
    }
  ],
  "attributes": [
    {
      object (AttributeDefinition)
    }
  ],
  "resources": {
    object (ResourceSpecification)
  }
}
Fields
operator

string

The name of this operator.

Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, PetDetector1.

inputArgs[]

object (ArgumentDefinition)

Declares input arguments.

outputArgs[]

object (ArgumentDefinition)

Declares output arguments.

attributes[]

object (AttributeDefinition)

Declares the attributes.

resources

object (ResourceSpecification)

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

string

The name of the argument.

Tentatively [_a-z0-9]*[a-z0-9]?, e.g., video, audio, high_fps_frame.

type

string

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 (AttributeValue)
  }
}
Fields
attribute

string

The name of the attribute.

Tentatively [_a-z0-9]*[a-z0-9]?, e.g., max_frames_per_video, resize_height.

type

string

The type of this attribute.

See attribute_value.proto for possibilities.

defaultValue

object (AttributeValue)

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

string

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

string

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

integer

Number of gpus.

latencyBudgetMs

integer

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

create

Creates a new Operator in a given project and location.

delete

Deletes a single Operator.

get

Gets details of a single Operator.

list

Lists Operators in a given project and location.

patch

Updates the parameters of a single Operator.