kolena.workflow.define_workflow
#
define_workflow(name, test_sample_type, ground_truth_type, inference_type)
#
Define a new workflow, specifying its test sample, ground truth, and inference types.
from kolena.workflow import define_workflow
from my_code import MyTestSample, MyGroundTruth, MyInference
_, TestCase, TestSuite, Model = define_workflow(
"My Workflow",
MyTestSample, # extends e.g. kolena.workflow.Image (or uses directly)
MyGroundTruth, # extends kolena.workflow.GroundTruth
MyInference, # extends kolena.workflow.Inference
)
define_workflow
is provided as a convenience method to create the TestCase
,
TestSuite
, and Model
objects
for a new workflow. These objects can also be defined manually by subclassing them and binding the workflow
class variable:
from kolena.workflow import TestCase
from my_code import my_workflow
class MyTestCase(TestCase):
workflow = my_workflow
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the workflow. |
required |
test_sample_type
|
Type[TestSample]
|
The type of the |
required |
ground_truth_type
|
Type[GroundTruth]
|
The type of the |
required |
inference_type
|
Type[Inference]
|
The type of the |
required |
Returns:
Type | Description |
---|---|
Tuple[Workflow, Type[TestCase], Type[TestSuite], Type[Model]]
|