Workflow Components

class indico.queries.workflow_components.AddLinkedLabelComponent(after_component_id, workflow_id, labelset_id, model_group_id, groups, after_component_link_id=None)

Adds a linked label transformer that groups together labels

  • Parameters:
    • after_component_id (int) – the component this component follows.
    • workflow_id (int) – the workflow id.
    • labelset_id (int) – the labelset to source classes from.
    • model_group_id (int) – the model group to source classes from.
    • groups (List**[LinkedLabelGroup]) – configuration for how to group labels.

class indico.queries.workflow_components.AddContentLengthFilterComponent(workflow_id, after_component_id, after_component_link_id=None, minimum=None, maximum=None)

Adds a content length filter.

  • Parameters:
    • workflow_id (int) – the workflow id.
    • after_component_id (int) – the component this component follows.
    • minimum (int) – minimum length of content to accept. Defaults to None.
    • maximum (int) – maximum length of content to accept. Defaults to None.

class indico.queries.workflow_components.AddLinkClassificationComponent(workflow_id, after_component_id, model_group_id, filtered_classes, labels=None, after_component_link_id=None)

Adds a link classification model component with filtered classes.

  • Parameters:
    • workflow_id (int) – the workflow id.
    • after_component_id (int) – the component this component follows.
    • model_group_id (int) – the model group to source classes from.
    • filtered_classes (List[List[str]]) – sets of classes to filter, i.e., [[“A”], [“A”,”B”]]
    • labels (str) – decides if to use “actual” or “predicted” labels.

class indico.queries.workflow_components.AddModelGroupComponent(workflow_id, dataset_id, name, source_column_id, after_component_id=None, after_link_id=None, labelset_column_id=None, new_labelset_args=None, new_questionnaire_args=None, model_training_options=None, model_type=None)

Adds a new model group to a workflow, optionally with a customized questionnaire.
Available on 5.0+ only.
Returns workflow with updated component list, which will contain the added Model Group.

  • Parameters:
    • workflow_id (int) – the id of the workflow to add the component to.
    • dataset_id (int) – the id of the dataset of this workflow/model group.
    • name (str) – name of the model group.
    • source_column_id (str) – source column identifier from dataset.
    • after_component_id (str) – the id of the previous component, or step, that should precede this step.
      Typically, this prior component would be something like “INPUT_OCR_EXTRACTION” or “INPUT_IMAGE” and can
      be found by using “component_by_type()” on the parent workflow.
    • labelset_column_id (int) – the labelset column to copy from.
    • new_labelset_args (NewLabelsetArguments) – if needed, new labelset to add.
      Only use if not using labelset_column_id.
    • new_questionnaire_args (NewQuestionnaireArguments) – Customize the questionnaire associated with this model group.

class indico.queries.workflow_components.DeleteWorkflowComponent(workflow_id, component_id)

Deletes a component from a workflow. If the component has an associated model, the model is deleted as well.
Available on 5.3+ only.
Returns workflow with updated list of components and links

  • Parameters:
    • workflow_id (int) – the id of the workflow to delete the component from.
    • component_id (int) – the id of the component to delete.