Create Entrypoints#

This how-to explains how to build Entrypoints in Dioptra.

Prerequisites#

Entrypoint Creation Workflow#

Follow these steps to create an Entrypoint. You can perform these actions via the Graphical User Interface (GUI) or programmatically using the Python Client.

Step 1: Locate Plugins, Queues, Groups, and Parameter Types to attach to the Entrypoint#

Ensure you have created at least one plugin and at least one queue.

You will be able to automatically select these resources in the GUI using dropdown menus in the following steps.

Step 2: Create an Entrypoint#

In the Dioptra GUI, navigate to the Entrypoints tab. Click Create. Enter metadata, including:

  • name

  • group

  • queues

  • description (optional)

Step 3: Add Entrypoint Parameters (optional)#

Entrypoints are parameterizable. Any parameters or artifact input parameters you create can be specified when an Entrypoint is run as a job.

On the Entrypoint creation page, go to the Entrypoint Parameters box and click Create.

For each parameter, enter the following:

  • Name

  • Type

  • Default Value (optional).

Step 4: Add Artifact Input Parameters (optional)#

If you would like this entrypoint to load an artifact from disk and make it available to the Task Graph, create an artifact input parameter.

On the Entrypoint creation page, go to the Artifact Parameters box and click Create.

For each artifact input parameter, provide the following:

  • Artifact Input Name

  • Output Parameters (one or more)

An artifact task can produce multiple output parameters in the deserialize() method. Which artifact handler is used is selected at job run time.

For each artifact input’s output parameter, provide the following:

  • Output Parameter Name

  • Output Parameter Type

Step 5. Create the Task Graph#

When an entrypoint is run as a job, the task graph will be executed by the worker in order. Define the Task Graph for the entrypoint.

On the Entrypoint creation page, scroll to the Task Graph Info box and select the Task Plugins dropdown - select any Plugins that you want to use for this Entrypoint.

In the Task Graph code editor, add YAML code that defines your Task Graph. You can also add tasks to the code editor by clicking add to task graph from the Function Tasks table.

Step 6. Create the Artifact Task Graph (optional)#

If you want to save any objects from your entrypoint to disk, you need to define that logic in the Artifact Task Graph section.

On the Entrypoint creation page, scroll to the Artifact Info box and select the Artifact Task Plugins dropdown - select any plugins that you wish to use the Artifact Tasks from.

In the Artifact Output Graph code editor, add YAML code that defines your Artifact Output Graph. You can also add artifact tasks to the code editor by clicking add to task graph from the Artifact Tasks table.

See Also#