Task

Module dedicated to high-level features around task management.

See also CWorkflowTask for all available methods from task object instance.

Import

from ikomia.core import task

Classes

TaskParam()

Base class to manage task parameters.

Functions

create([name, public_hub, private_hub])

Create task instance (ie algorithm) from the given name.

get_output(task_obj, types[, index])

Get specific output(s) of a task from the given types (IODataType).

Details

ikomia.core.task.create(name: str = '', public_hub: bool = True, private_hub: bool = False) CWorkflowTask

Create task instance (ie algorithm) from the given name. See IkomiaRegistry for details.

Parameters:
  • name (str) – unique algorithm name

  • public_hub (bool) – if True, try to install from public HUB if not installed locally

  • private_hub (bool) – if True, try to install from private HUB if not installed locally

Returns:

algorithm instance

Return type:

CWorkflowTask or derived

ikomia.core.task.get_output(task_obj: CWorkflowTask, types: list, index: int = -1) CWorkflowTaskIO

Get specific output(s) of a task from the given types (IODataType).

Parameters:
  • task_obj (CWorkflowTask based object) – task instance

  • types (list of IODataType) – output data types

  • index (int) – zero-based index in the candidates output list. If -1, all candidates are returned.

Returns:

outputs

Return type:

instance or list of CWorkflowTaskIO based object