Clara Holoscan Deploy 0.7.4
0.7.4

8.14. Input

Declares that an operator requires input to execute. Clara Deploy SDK will ensure that all input requirements are met before executing the operator. Inputs to operators can be disk-based payloads (all api-versions) or shared memory objects (available in pipeline api-version 0.5.0 and above).

  • Disk-based payloads and require a path entry, and a type of stream with a mandatory free-from element-type. For example, ```YAML name: my-operator input:

  • name: file-data-in path: /in/data type: stream # api-version 0.5.0+ element-type: specific-dicom-type # api-version 0.5.0+ ```

  • If the from attribute is not declared (as above) the orchestration engine will assume the operator requires the pipeline payload as input. If the from attribute is specified it should match the name of the upstream operator, and the names of this input should match the name of the output of the upstream operator and its type. For example, ```YAML name: upstream-op output:

  • name: generated-file-data path: /out type: stream # api-version 0.5.0+ element-type: my-file-type # api-version 0.5.0+ name: downstream-op input:

  • from: upstream-op name: generated-file-data # matches generated-file-data from upstream-op above path: /in type: stream # api-version 0.5.0+ element-type: my-file-type # api-version 0.5.0+ ```

For pipeline api-version 0.4.0 and below, all input payloads require a path attribute as operators can only exchange data using local volume mounts as no type information is available to the Clara (or Argo) orchestrator.

In pipeline api-version 0.5.0 and above (available only through Clara orchestrator), operator inputs and outputs support type information through the type and element-type attributes (see Clara types). This allows the orchestrator to assign certain types to shared memory for faster inter operator data exchange.

type

Medium

Required Attributes

Omit Attributes

stream

Disk

element-type, path

shape

array

Shared Memory

element-type, shape

path

string

Shared Memory

element-type, shape, path

Clara Primitive

Shared Memory

element-type, shape, path

8.14.1.1. from

type: string

The name of another operator in the same pipeline definition. The output of the named operator will be mapped to this operator at path.

When the named operator declares a named output, the input must also declare the name of the output in order to properly associated them.

8.14.1.2. name

type: string

The name of the upstream operator’s output to be mapped to an operator’s input declaration.

See names for additional information about name in Clara Deploy SDK pipeline definitions.

8.14.1.3. path

type: string

Container-local path to which Clara Deploy SDK will mount the requested storage volume.

The path property

  • is mandatory in api-version 0.4.0 and below

  • is mandatory in api-version 0.5.0 and above when type is stream

  • omitted is api-version 0.5.0 and above when type is not stream Paths must be fully-qualified.

8.14.1.4. type

(available api-version 0.5.0 and above)

type: string

Describes the Clara structure or Clara primitive.

Clara Primitive

Logical Interpretation

array Representation

u8, uint8

8-bit unsigned integer

array<uint8>[1]

u16, uint16

16-bit unsigned integer

array<uint16>[1]

u32, uint32

32-bit unsigned integer

array<uint32>[1]

u64, uint64

64-bit unsigned integer

array<uint64>[1]

i8, int8

8-bit unsigned integer

array<int8>[1]

i16, int16

16-bit signed integer

array<int16>[1]

i32, int32

32-bit signed integer

array<int32>[1]

i64, int64

64-bit signed integer

array<int64>[1]

f16, float16

16-bit floating-point

array<float16>[1]

f32, float32

32-bit floating-point

array<float32>[1]

f64, float64

64-bit floating-point

array<float64>[1]

8.14.1.5. element-type

(available api-version 0.5.0 and above)

type: string

Must be specified only for array and stream types (see table above); must be omitted for Clara primitives and string.

element-type accepts only Clara primitive types (see Table under type section).

8.14.1.6. shape

(available api-version 0.5.0 and above)

type: list of dimension lengths. Use -1 to indicate that the length is dynamic (will be set at run-time). Non-dynamic lengths must be greater than zero.

Must be specified only for array type. Omitted for all other types.

Accepts a list of dimension lengths. Use -1 to indicate the size is dynamic (will be defined at run-time). Non-dynamic dimension lengths must be greater than zero.

8.14.1.7. Examples:

3D array with dynamic first dimension.

Copy
Copied!
            

shape: [-1, 224, 224]

3-channel 3D array with three dynamically updatable dimensions.

Copy
Copied!
            

shape: [3, -1, -1, -1]

3-channel static array of 224 x 224.

Copy
Copied!
            

shape: [3, 224, 224]


© Copyright 2018-2021, NVIDIA Corporation. All rights reserved. Last updated on Feb 1, 2023.