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-version
s) or shared memory objects (available in pipeline api-version
0.5.0
and above).
Disk-based payloads and require a
path
entry, and atype
ofstream
with a mandatory free-fromelement-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 thefrom
attribute is specified it should match the name of the upstream operator, and thename
s of thisinput
should match the name of theoutput
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
fromupstream-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.
|
Medium |
Required Attributes |
Omit Attributes |
---|---|---|---|
|
Disk |
|
|
|
Shared Memory |
|
|
|
Shared Memory |
|
|
Shared Memory |
|
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 belowis mandatory in
api-version
0.5.0
and above whentype
isstream
omitted is
api-version
0.5.0
and above whentype
is notstream
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 |
|
---|---|---|
|
8-bit unsigned integer |
|
|
16-bit unsigned integer |
|
|
32-bit unsigned integer |
|
|
64-bit unsigned integer |
|
|
8-bit unsigned integer |
|
|
16-bit signed integer |
|
|
32-bit signed integer |
|
|
64-bit signed integer |
|
|
16-bit floating-point |
|
|
32-bit floating-point |
|
|
64-bit floating-point |
|
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.
shape: [-1, 224, 224]
3-channel 3D array with three dynamically updatable dimensions.
shape: [3, -1, -1, -1]
3-channel static array of 224 x 224
.
shape: [3, 224, 224]