data_designer.config.utils.type_helpers
data_designer.config.utils.type_helpers
data_designer.config.utils.type_helpers
Bases: str, enum.Enum
Create a string enum from a type union.
The type union is assumed to be a union of configs (Pydantic models) that have a discriminator field, which must be a Literal string type - e.g., Literal[“expression”].
Parameters:
Name of the StrEnum.
Type union of configs (Pydantic models).
Name of the discriminator field.
Returns:
data_designer.config.utils.type_helpers.StrEnum
StrEnum with values being the discriminator field values of the configs in the type union.
Example:
Returns a dictionary of sampler parameter classes.