Automation Nodes
  • 15 Aug 2024
  • Dark
    Light
  • PDF

Automation Nodes

  • Dark
    Light
  • PDF

Article summary

Automation Nodes

The Automation elements of the pipeline consists of FaaS and Code nodes.

FaaS Node

The FaaS Node provides the capability to invoke a function that is defined within the Applications > Application Hub. It is particularly useful when dealing with larger code scopes or when the code needs to be reused across various pipeline components or multiple pipelines. Leveraging FaaS for these purposes centralizes code maintenance and version control, while also offering control over computing settings and resource allocation. For more information about FaaS, see FaaS Introduction.

Details

When you click on a FaaS Node, its details, such as Configuration, Executions, Logs, Instances, and available Actions are shown on the right-side panel.

For the actions available on each node in the right-side panel, see the Pipeline Node Actions.

The FaaS Node details are presented in four tabs as follows:

Config Tab

  • Node Name: By default, FaaS Node is displayed as name. You can change it accordingly.
  • Function: Search and select a function using its function name, application name, or project name. The FaaS Node’s Output and Input channels are determined by the function chosen for the node.
  • Node Input: It is generated automatically according to the selected FaaS.
  • Node Output: It is generated automatically according to the selected FaaS.
  • Trigger (Optional): An Event/Cron Triggers can be set on this node, enabling you to initiate the pipeline run from this specific point.
Edit mode

In Edit mode, you can edit the Node details.

For information on the Executions, Logs, and Instances tabs, see the Node Details article.

Code Node

The Code node is designed to provide ad-hoc capability to add and execute straightforward functions directly into pipelines (for example, a function that uploads annotations from items as JSON to the dataset). When the pipeline runs, a dedicated service is started and needs to be monitored, maintained, and scaled accordingly.

See the Automatic Modalities Pipeline for an example of using the Code node.

Details

When you click on a Code Node, its details, such as Configuration, Executions, Logs, Instances, and available Actions are shown on the right-side panel.

For the actions available on each node in the right-side panel, see the Pipeline Node Actions.

The Code Node details are presented in four tabs as follows:

Config Tab

  • Node Name: By default, code is displayed as name. You can change accordingly.
  • Application Name: Provide a name for the FaaS application that will be created to execute this code node. This name will be used as both the package and service names.
  • Function Name: Provide a name for the function that will run your code. Make sure to use the same name as defined in the code, following the Python convention for function names. By default, run is displayed as name.
  • Source Code Type: Select a source code type from the following list.
    • Code Editor (by default): The Code Editor allows you to enter the code for the code node.
    • Upload ZIP: It allows you to upload your code in a .zip file.
    • Connect GitHub: It allows you to enter the URL of your code's Git repository and Git Tag.
  • Requirements (Optional): It allows you to upload the requirements file in .txt format. This file is necessary when your code relies on additional Python libraries for execution, and it helps specify which Python libraries need to be installed. Alternatively, a docker image can be specified (click node's "Actions" menu > "Edit service config"). For more details, read here.
  • Node Inputs: Input channels are set to be of type: item by default. You can perform the following:
    • Add new inputs by clicking on the plus icon. It allows you to add a new name, new input type, and description.
    • Click on the Pencil icon to update Name and Description. You cannot edit the type.
    • Click Set Parameter to set input parameter for the Code node.
    • For more information, see the Node Inputs article.
  • Node Outputs: Output channels are set to be of type: item by default. You can perform the following:
    • Add new outputs by clicking on the plus icon. It allows you to add a new name, new output type, description, and action.
    • Click on the Pencil icon to update Name, Description, and Actions. You cannot edit the type.

When adding output channels, you may need to choose a different type for your output. For example, if a code node connects to another code node that expects a boolean as an input, you will need to define the output of the first code node to be of type boolean.

A Code node can have multiple input and output channels.

Consider uploading your code as a package to our Application's FaaS, and using it as a FaaS node rather than code. This will enable you to better manage versions, reuse the service, and more.

For information on the Executions, Logs, and Instances tabs, see the Node Details article.



What's Next