> 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.config\_builder

## Module Contents

### Classes

| Name                                                                                       | Description                                        |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------- |
| [`BuilderConfig`](#data_designerconfigconfig_builderbuilderconfig)                         | Configuration container for Data Designer builder. |
| [`DataDesignerConfigBuilder`](#data_designerconfigconfig_builderdatadesignerconfigbuilder) | Config builder for Data Designer configurations.   |

### Functions

| Name                                                                           | Description                                                                                                                                                                                       |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`_load_model_configs`](#data_designerconfigconfig_builder_load_model_configs) | Resolves the provided model\_configs, which may be a string or Path to a model configuration file. If None or empty, returns default model configurations if possible, otherwise raises an error. |

### Data

[`logger`](#data_designerconfigconfig_builderlogger)

### API

```python
logger = getLogger(...)
```

```python
class data_designer.config.config_builder.BuilderConfig(
    /,
    **data: typing.Any
)
```

**Bases**: `data_designer.config.exportable_config.ExportableConfigBase`

Configuration container for Data Designer builder.

This class holds the main Data Designer configuration along with optional
datastore settings needed for seed dataset operations.

**Parameters:**

The main Data Designer configuration containing columns,
constraints, profilers, and other settings.

**Attributes:**

The main Data Designer configuration containing columns,
constraints, profilers, and other settings.

**Initialization:**

Create a new model by parsing and validating input data from keyword arguments.

Raises \[`ValidationError`]\[pydantic\_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

```python
data_designer: data_designer.config.data_designer_config.DataDesignerConfig
```

```python
library_version: str | None
```

```python
_set_library_version() -> data_designer.config.config_builder.BuilderConfig
```

```python
class data_designer.config.config_builder.DataDesignerConfigBuilder(
    model_configs: list[data_designer.config.models.ModelConfig] | str | pathlib.Path | None = None,
    tool_configs: list[data_designer.config.mcp.ToolConfig] | None = None
)
```

Config builder for Data Designer configurations.

This class provides a high-level interface for building Data Designer configurations.

**Initialization:**

Initialize a new DataDesignerConfigBuilder instance.

**Parameters:**

Model configurations. Can be:

* None to use default model configurations in local mode
* A list of ModelConfig objects
* A string or Path to a model configuration file

Tool configurations for MCP tool calling. Can be:

* None if no tool configs are needed
* A list of ToolConfig objects

```python
from_config(config: dict | str | pathlib.Path | data_designer.config.config_builder.BuilderConfig) -> typing_extensions.Self
```

Create a DataDesignerConfigBuilder from an existing configuration.

Accepts both the full `BuilderConfig` format (with a top-level
`data_designer` key) and the shorthand `DataDesignerConfig` format
(`columns`, `model_configs`, etc. at the top level). When the
shorthand format is detected it is automatically normalized into a
full `BuilderConfig`.

**Parameters:**

Configuration source. Can be:

* A dictionary containing the configuration
* A string or Path to a local YAML/JSON configuration file
* An HTTP(S) URL string to a YAML/JSON configuration file
* A BuilderConfig object

**Returns:**

`typing_extensions.Self`

A new instance populated with the configuration from the provided source.

**Raises:**

If the config format is invalid.

If the builder config loaded from the config is invalid.

```python
model_configs: list[data_designer.config.models.ModelConfig]
```

Get the model configurations for this builder.

**Returns:**

`Any`

A list of ModelConfig objects used for data generation.

```python
tool_configs: list[data_designer.config.mcp.ToolConfig]
```

Get the tool configurations for this builder.

**Returns:**

`Any`

A list of ToolConfig objects used for MCP tool calling.

```python
allowed_references: list[str]
```

Get all referenceable variables allowed in prompt templates and expressions.

This includes all column names and their side effect columns that can be
referenced in prompt templates and expressions within the configuration.

**Returns:**

`Any`

A list of variable names that can be referenced in templates and expressions.

```python
info: data_designer.config.utils.info.ConfigBuilderInfo
```

Get the ConfigBuilderInfo object for this builder.

**Returns:**

`Any`

An object containing information about the configuration.

```python
add_model_config(model_config: data_designer.config.models.ModelConfig) -> typing_extensions.Self
```

Add a model configuration to the current Data Designer configuration.

**Parameters:**

The model configuration to add.

```python
delete_model_config(alias: str) -> typing_extensions.Self
```

Delete a model configuration from the current Data Designer configuration by alias.

**Parameters:**

The alias of the model configuration to delete.

```python
add_tool_config(tool_config: data_designer.config.mcp.ToolConfig) -> typing_extensions.Self
```

Add a tool configuration to the current Data Designer configuration.

**Parameters:**

The tool configuration to add.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

**Raises:**

If a tool configuration with the same alias already exists.

```python
delete_tool_config(alias: str) -> typing_extensions.Self
```

Delete a tool configuration from the current Data Designer configuration by alias.

**Parameters:**

The alias of the tool configuration to delete.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

```python
add_column(
    column_config: data_designer.config.column_types.ColumnConfigT | None = None,
    *,
    name: str | None = None,
    column_type: data_designer.config.column_types.DataDesignerColumnType | None = None,
    **kwargs
) -> typing_extensions.Self
```

Add a Data Designer column configuration to the current Data Designer configuration.

If no column config object is provided, you must provide the `name`, `column_type`, and any
additional keyword arguments that are required by the column config constructor.

**Parameters:**

Data Designer column config object to add.

Name of the column to add. This is only used if `column_config` is not provided.

Column type to add. This is only used if `column_config` is not provided.

Additional keyword arguments to pass to the column constructor.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

**Raises:**

If neither a column config nor the required constructor
arguments are provided.

If the provided column config is not one of the supported
column config types.

```python
add_constraint(
    constraint: data_designer.config.sampler_constraints.ColumnConstraintT | None = None,
    *,
    constraint_type: data_designer.config.sampler_constraints.ConstraintType | None = None,
    **kwargs
) -> typing_extensions.Self
```

Add a constraint to the current Data Designer configuration.

Currently, constraints are only supported for numerical samplers.

You can either provide a constraint object directly, or provide a constraint type and
additional keyword arguments to construct the constraint object. Valid constraint types are:

* "scalar\_inequality": Constraint between a column and a scalar value.
* "column\_inequality": Constraint between two columns.

**Parameters:**

Constraint object to add.

Constraint type to add. Ignored when `constraint` is provided.

Additional keyword arguments to pass to the constraint constructor.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

```python
add_processor(
    processor_config: data_designer.config.processor_types.ProcessorConfigT | None = None,
    *,
    processor_type: data_designer.config.processors.ProcessorType | None = None,
    **kwargs
) -> typing_extensions.Self
```

Add a processor to the current Data Designer configuration.

If a processor with the same name already exists, it is replaced (upsert),
making notebook cells safely re-runnable.

You can either provide a processor config object directly, or provide a processor type and
additional keyword arguments to construct the processor config object.

**Parameters:**

The processor configuration object to add.

The type of processor to add.

Additional keyword arguments to pass to the processor constructor.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

```python
_remove_processor_by_name(name: str) -> None
```

Remove an existing processor by name and undo its side-effects.

```python
_resolve_drop_column_names(column_names: list[str]) -> list[str]
```

Resolve column names, expanding glob patterns against known column configs.

```python
add_profiler(profiler_config: data_designer.config.analysis.column_profilers.ColumnProfilerConfigT) -> typing_extensions.Self
```

Add a profiler to the current Data Designer configuration.

**Parameters:**

The profiler configuration object to add.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

**Raises:**

If the profiler configuration is of an invalid type.

```python
get_profilers() -> list[data_designer.config.analysis.column_profilers.ColumnProfilerConfigT]
```

Get all profilers.

**Returns:**

`list[data_designer.config.analysis.column_profilers.ColumnProfilerConfigT]`

A list of profiler configuration objects.

```python
build() -> data_designer.config.data_designer_config.DataDesignerConfig
```

Build a DataDesignerConfig instance based on the current builder configuration.

**Returns:**

`data_designer.config.data_designer_config.DataDesignerConfig`

The current Data Designer config object.

**Raises:**

If any ToolConfig has duplicate tool names in its allow\_tools list.

```python
_validate_tool_configs_no_duplicates() -> None
```

Validate that no ToolConfig has duplicate tool names in its allow\_tools list.

This is a static validation that catches obvious duplicates at config build time,
before providers are queried. Full validation (including duplicates across providers)
happens at resource provider creation time.

**Raises:**

If any ToolConfig has duplicate tool names in allow\_tools.

```python
delete_constraints(target_column: str) -> typing_extensions.Self
```

Delete all constraints for the given target column.

**Parameters:**

Name of the column to remove constraints for.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

```python
delete_column(column_name: str) -> typing_extensions.Self
```

Delete the column with the given name.

**Parameters:**

Name of the column to delete.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

**Raises:**

If trying to delete a seed dataset column.

```python
get_column_config(name: str) -> data_designer.config.column_types.ColumnConfigT
```

Get a column configuration by name.

**Parameters:**

Name of the column to retrieve the config for.

**Returns:**

`data_designer.config.column_types.ColumnConfigT`

The column configuration object.

**Raises:**

If no column with the given name exists.

```python
get_column_configs() -> list[data_designer.config.column_types.ColumnConfigT]
```

Get all column configurations.

**Returns:**

`list[data_designer.config.column_types.ColumnConfigT]`

A list of all column configuration objects.

```python
get_tool_config(alias: str) -> data_designer.config.mcp.ToolConfig
```

Get a tool configuration by alias.

**Parameters:**

The alias of the tool configuration to retrieve.

**Returns:**

`data_designer.config.mcp.ToolConfig`

The tool configuration object.

**Raises:**

If no tool configuration with the given alias exists.

```python
get_constraints(target_column: str) -> list[data_designer.config.sampler_constraints.ColumnConstraintT]
```

Get all constraints for the given target column.

**Parameters:**

Name of the column to get constraints for.

**Returns:**

`list[data_designer.config.sampler_constraints.ColumnConstraintT]`

A list of constraint objects targeting the specified column.

```python
get_columns_of_type(column_type: data_designer.config.column_types.DataDesignerColumnType) -> list[data_designer.config.column_types.ColumnConfigT]
```

Get all column configurations of the specified type.

**Parameters:**

The type of columns to filter by.

**Returns:**

`list[data_designer.config.column_types.ColumnConfigT]`

A list of column configurations matching the specified type.

```python
get_columns_excluding_type(column_type: data_designer.config.column_types.DataDesignerColumnType) -> list[data_designer.config.column_types.ColumnConfigT]
```

Get all column configurations excluding the specified type.

**Parameters:**

The type of columns to exclude.

**Returns:**

`list[data_designer.config.column_types.ColumnConfigT]`

A list of column configurations that do not match the specified type.

```python
get_processor_configs() -> list[data_designer.config.processor_types.ProcessorConfigT]
```

Get processor configuration objects.

**Returns:**

`list[data_designer.config.processor_types.ProcessorConfigT]`

A list of processor configuration objects.

```python
get_seed_config() -> data_designer.config.seed.SeedConfig | None
```

Get the seed config for the current Data Designer configuration.

**Returns:**

`data_designer.config.seed.SeedConfig | None`

The seed config if configured, None otherwise.

```python
num_columns_of_type(column_type: data_designer.config.column_types.DataDesignerColumnType) -> int
```

Get the count of columns of the specified type.

**Parameters:**

The type of columns to count.

**Returns:**

`int`

The number of columns matching the specified type.

```python
with_seed_dataset(
    seed_source: data_designer.config.seed_source_types.SeedSourceT,
    *,
    sampling_strategy: data_designer.config.seed.SamplingStrategy = SamplingStrategy.ORDERED,
    selection_strategy: data_designer.config.seed.IndexRange | data_designer.config.seed.PartitionBlock | None = None
) -> typing_extensions.Self
```

Add a seed dataset to the current Data Designer configuration.

This method sets the seed dataset for the configuration, but columns are not resolved until
compilation (including validation) is performed by the engine using a SeedReader.

**Parameters:**

The pointer to the seed dataset.

The sampling strategy to use when generating data from the seed dataset.
Defaults to ORDERED sampling.

An optional selection strategy to use when generating data from the seed dataset.
Defaults to None.

**Returns:**

`typing_extensions.Self`

The current Data Designer config builder instance.

```python
write_config(
    path: str | pathlib.Path,
    indent: int | None = 2,
    **kwargs
) -> None
```

Write the current configuration to a file.

**Parameters:**

Path to the file to write the configuration to.

Indentation level for the output file (default: 2).

Additional keyword arguments passed to the serialization methods used.

**Raises:**

If the file format is unsupported.

If the configuration cannot be serialized.

```python
get_builder_config() -> data_designer.config.config_builder.BuilderConfig
```

Get the builder config for the current Data Designer configuration.

**Returns:**

`data_designer.config.config_builder.BuilderConfig`

The builder config.

```python
__repr__() -> str
```

Generates a string representation of the DataDesignerConfigBuilder instance.

**Returns:**

`str`

A formatted string showing the builder's configuration including seed dataset and column information grouped by type.

```python
_repr_html_() -> str
```

Return an HTML representation of the DataDesignerConfigBuilder instance..

This method provides a syntax-highlighted HTML representation of the
builder's string representation.

**Returns:**

`str`

HTML string with syntax highlighting for the builder representation.

```python
data_designer.config.config_builder._load_model_configs(model_configs: list[data_designer.config.models.ModelConfig] | str | pathlib.Path | None = None) -> list[data_designer.config.models.ModelConfig]
```

Resolves the provided model\_configs, which may be a string or Path to a model configuration file.
If None or empty, returns default model configurations if possible, otherwise raises an error.