Use workflow templates

    Some complex Machine Learning processes can be created using multiple workers. When creating a process, you need to add each worker to your process and setup dependencies. This step presents two drawbacks:

    • it is time-consuming: some processes have to be run periodically with the same workers each time, and might include multiple workers, with dependencies and worker configurations,
    • it is a source of errors: the user may forget a dependency, a worker, or a worker configuration parameter

    Once you have set up your complete workflow, you can use a workflow template to save it and avoid having to configure it all over again.

    What is a workflow template ?🔗

    A template is a saved Machine Learning process (which are described in their dedicated section). The template saves not only the workers from the process, but also the selected worker versions, worker configurations if they were set up, and the dependencies between the workers.

    You can see the templates available to you from the Process page on Arkindex:

    • Click Process on the blue navigation bar.
    List processes
    List processes
    • Workflow templates are not displayed by default on this page. You can use the filters to display them.
    • Use the Mode selection dropdown menu to select the Template mode.
    Filter processes to keep those with mode Template
    Filter processes to keep those with mode Template
    • The process list is updated and only workflow templates are displayed.
    List available templates
    List available templates

    Create a workflow template🔗

    Workflow templates can only be created from Worker processes, and have to contain at least one worker. There are two ways to create workflow templates.

    From the process configuration page🔗

    You can create workflow template almost the same way as creating a Process. Following the steps described in the process creation section, you obtain a workflow with workers.

    A process with workers on the process configuration page
    A process with workers on the process configuration page

    Then click on the Create template button, above the list of workers, to open the template creation modal.

    Open the template creation modal
    Open the template creation modal

    The template creation modal opens. Enter a name for your template, and click the Create button.

    Create your new workflow template
    Create your new workflow template

    From the process status page🔗

    If you didn't save your process during the configuration step, you can still do it after running it, from the process status page. It will save a template with the workers, versions, configurations and dependencies with which the now running / finished process was initially configured. Click on the Create template button to open the template creation modal.

    Create a template from the process status page
    Create a template from the process status page

    The template creation modal opens. Enter a name for your template, and click the Create button.

    Create your new workflow template
    Create your new workflow template

    Template details🔗

    You can look at the workers composing a template, their details and dependencies, from the Process list page, using the filters to display templates. First you have to find the template you wish to examine in the list. To view a template's details, click on its id.

    Click on a template's id in the template list
    Click on a template's id in the template list

    This takes you to a new page, where you can see which workers are included in the template. By hovering over the wheel-shaped icon next to a worker's name in the workers list, you can also see the details of this worker's version and configuration used in the template.

    View the template's details
    View the template's details

    Use a template🔗

    You can use existing workflow templates when configuring a process. After the elements selection step, click the Select template button on the process configuration page.

    Select a template from the process configuration page
    Select a template from the process configuration page

    The template selection modal opens and the list of available templates is displayed in the column on the left. When selecting a template from the template selection modal, its details are displayed on the right as shown on the figure below.

    The template's details are shown on the right
    The template's details are shown on the right

    Once you have selected the desired template, click the blue Apply button on the bottom-left corner of the modal.

    Apply the template to your process
    Apply the template to your process

    Your new process is now configured with the workers, versions, configurations and dependencies of the chosen template.

    The template is applied, the workers are added to the process
    The template is applied, the workers are added to the process

    You can then add more workers, create a new template from these changes following the instructions from the previous section, or run the process.

    Templates rights🔗

    Templates are processes in a Template mode, and follow the access rights rules defined in the processes rights section. To use a template, a user must have the right to run a Machine Learning workflow using each worker included in the template.

    To share a template with another user, you need to:

    • give the user Guest (or higher) access to the Template process,
    • give the user Contributor (or higher) access to each worker used in the template.