Why are pipeline steps defined as string and not as enum? #661
-
For a better understanding I would like to know why the pipeline steps are defined as string and not as enum? Is it to be extensible by the developer? As strings are very error prone for configurations like this I would rather expect to have a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
There is a default list of steps like "extract" and "gen_embeddings", however, additional steps can be added via configuration. An enum would allow only known handlers with known names. The current solution instead allows to define custom handlers, and assign each a name. During the ingestion, one can select which handlers to execute passing a list of names. Since the list is configurable and custom handler can be added, the solution can be used for any number of steps and any custom pipeline. See of example this scenario: #662 |
Beta Was this translation helpful? Give feedback.
-
Thank you, that's what I thought. What would you think of moving related consts from the public static class PipelineSteps
{
public const string Extract = "extract";
public const string Partition = "partition";
public const string GenEmbeddings = "gen_embeddings";
...
} |
Beta Was this translation helpful? Give feedback.
There is a default list of steps like "extract" and "gen_embeddings", however, additional steps can be added via configuration. An enum would allow only known handlers with known names. The current solution instead allows to define custom handlers, and assign each a name. During the ingestion, one can select which handlers to execute passing a list of names. Since the list is configurable and custom handler can be added, the solution can be used for any number of steps and any custom pipeline.
See of example this scenario: #662