> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/datadesigner/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/datadesigner/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/datadesigner/_mcp/server.

# data\_designer.config.utils.type\_helpers

## Module Contents

### Classes

| Name                                                      | Description                                                                 |
| --------------------------------------------------------- | --------------------------------------------------------------------------- |
| [`StrEnum`](#data_designerconfigutilstype_helpersstrenum) | str(object='') -> str str(bytes\_or\_buffer\[, encoding\[, errors]]) -> str |

### Functions

| Name                                                                                                                                  | Description                                        |
| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| [`create_str_enum_from_discriminated_type_union`](#data_designerconfigutilstype_helperscreate_str_enum_from_discriminated_type_union) | Create a string enum from a type union.            |
| [`get_sampler_params`](#data_designerconfigutilstype_helpersget_sampler_params)                                                       | Returns a dictionary of sampler parameter classes. |
| [`resolve_string_enum`](#data_designerconfigutilstype_helpersresolve_string_enum)                                                     | None                                               |

### Data

[`SAMPLER_PARAMS`](#data_designerconfigutilstype_helperssampler_params)

### API

```python
class data_designer.config.utils.type_helpers.StrEnum
```

**Bases**: `str`, `enum.Enum`

```python
data_designer.config.utils.type_helpers.create_str_enum_from_discriminated_type_union(
    enum_name: str,
    type_union: type,
    discriminator_field_name: str
) -> data_designer.config.utils.type_helpers.StrEnum
```

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:**

```python
DataDesignerColumnType = create_str_enum_from_discriminated_type_union(
    enum_name="DataDesignerColumnType",
    type_union=ColumnConfigT,
    discriminator_field_name="column_type",
)
```

```python
data_designer.config.utils.type_helpers.get_sampler_params() -> dict[str, type[pydantic.BaseModel]]
```

Returns a dictionary of sampler parameter classes.

```python
data_designer.config.utils.type_helpers.resolve_string_enum(
    enum_instance: typing.Any,
    enum_type: type[enum.Enum]
) -> enum.Enum
```

```python
SAMPLER_PARAMS = get_sampler_params(...)
```