Data Designer's Config Builder
Use DataDesignerConfigBuilder to construct DataDesignerConfig objects. The builder accumulates model configs, tool configs, column configs, constraints, seed settings, processors, and profilers.
Inputs can come from scratch, a dict, BuilderConfig, a local YAML/JSON file, or an HTTP(S) YAML/JSON URL via from_config(). Use build() to create a DataDesignerConfig, or write_config() to serialize the current builder config to YAML or JSON.
Model config loading
DataDesignerConfigBuilder accepts model configs as a list of ModelConfig objects, a YAML/JSON config path, or None. When model_configs=None, the builder loads default model configs if Data Designer can run locally; otherwise initialization raises BuilderConfigurationError. Model configs define the aliases referenced by model-backed columns such as LLMTextColumnConfig, LLMCodeColumnConfig, LLMStructuredColumnConfig, LLMJudgeColumnConfig, EmbeddingColumnConfig, and ImageColumnConfig.
Classes:
| Name | Description |
|---|---|
BuilderConfig |
Configuration container for Data Designer builder. |
DataDesignerConfigBuilder |
Config builder for Data Designer configurations. |
BuilderConfig
Bases: 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.
Attributes:
| Name | Type | Description |
|---|---|---|
data_designer |
DataDesignerConfig
|
The main Data Designer configuration containing columns, constraints, profilers, and other settings. |
DataDesignerConfigBuilder(model_configs=None, tool_configs=None)
Config builder for Data Designer configurations.
This class provides a high-level interface for building Data Designer configurations.
Initialize a new DataDesignerConfigBuilder instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_configs
|
list[ModelConfig] | str | Path | None
|
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 |
None
|
tool_configs
|
list[ToolConfig] | None
|
Tool configurations for MCP tool calling. Can be: - None if no tool configs are needed - A list of ToolConfig objects |
None
|
Methods:
| Name | Description |
|---|---|
add_column |
Add a Data Designer column configuration to the current Data Designer configuration. |
add_constraint |
Add a constraint to the current Data Designer configuration. |
add_model_config |
Add a model configuration to the current Data Designer configuration. |
add_processor |
Add a processor to the current Data Designer configuration. |
add_profiler |
Add a profiler to the current Data Designer configuration. |
add_tool_config |
Add a tool configuration to the current Data Designer configuration. |
build |
Build a DataDesignerConfig instance based on the current builder configuration. |
delete_column |
Delete the column with the given name. |
delete_constraints |
Delete all constraints for the given target column. |
delete_model_config |
Delete a model configuration from the current Data Designer configuration by alias. |
delete_tool_config |
Delete a tool configuration from the current Data Designer configuration by alias. |
from_config |
Create a DataDesignerConfigBuilder from an existing configuration. |
get_builder_config |
Get the builder config for the current Data Designer configuration. |
get_column_config |
Get a column configuration by name. |
get_column_configs |
Get all column configurations. |
get_columns_excluding_type |
Get all column configurations excluding the specified type. |
get_columns_of_type |
Get all column configurations of the specified type. |
get_constraints |
Get all constraints for the given target column. |
get_processor_configs |
Get processor configuration objects. |
get_profilers |
Get all profilers. |
get_seed_config |
Get the seed config for the current Data Designer configuration. |
get_tool_config |
Get a tool configuration by alias. |
num_columns_of_type |
Get the count of columns of the specified type. |
with_seed_dataset |
Add a seed dataset to the current Data Designer configuration. |
write_config |
Write the current configuration to a file. |
Attributes:
| Name | Type | Description |
|---|---|---|
allowed_references |
list[str]
|
Get all referenceable variables allowed in prompt templates and expressions. |
info |
ConfigBuilderInfo
|
Get the ConfigBuilderInfo object for this builder. |
model_configs |
list[ModelConfig]
|
Get the model configurations for this builder. |
tool_configs |
list[ToolConfig]
|
Get the tool configurations for this builder. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
allowed_references
property
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:
| Type | Description |
|---|---|
list[str]
|
A list of variable names that can be referenced in templates and expressions. |
info
property
Get the ConfigBuilderInfo object for this builder.
Returns:
| Type | Description |
|---|---|
ConfigBuilderInfo
|
An object containing information about the configuration. |
model_configs
property
Get the model configurations for this builder.
Returns:
| Type | Description |
|---|---|
list[ModelConfig]
|
A list of ModelConfig objects used for data generation. |
tool_configs
property
Get the tool configurations for this builder.
Returns:
| Type | Description |
|---|---|
list[ToolConfig]
|
A list of ToolConfig objects used for MCP tool calling. |
add_column(column_config=None, *, name=None, column_type=None, **kwargs)
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:
| Name | Type | Description | Default |
|---|---|---|---|
column_config
|
ColumnConfigT | None
|
Data Designer column config object to add. |
None
|
name
|
str | None
|
Name of the column to add. This is only used if |
None
|
column_type
|
DataDesignerColumnType | None
|
Column type to add. This is only used if |
None
|
**kwargs
|
Additional keyword arguments to pass to the column constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Raises:
| Type | Description |
|---|---|
BuilderConfigurationError
|
If neither a column config nor the required constructor arguments are provided. |
InvalidColumnTypeError
|
If the provided column config is not one of the supported column config types. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |
add_constraint(constraint=None, *, constraint_type=None, **kwargs)
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:
| Name | Type | Description | Default |
|---|---|---|---|
constraint
|
ColumnConstraintT | None
|
Constraint object to add. |
None
|
constraint_type
|
ConstraintType | None
|
Constraint type to add. Ignored when |
None
|
**kwargs
|
Additional keyword arguments to pass to the constraint constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | |
add_model_config(model_config)
Add a model configuration to the current Data Designer configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_config
|
ModelConfig
|
The model configuration to add. |
required |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
209 210 211 212 213 214 215 216 217 218 219 220 | |
add_processor(processor_config=None, *, processor_type=None, **kwargs)
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:
| Name | Type | Description | Default |
|---|---|---|---|
processor_config
|
ProcessorConfigT | None
|
The processor configuration object to add. |
None
|
processor_type
|
ProcessorType | None
|
The type of processor to add. |
None
|
**kwargs
|
Additional keyword arguments to pass to the processor constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
add_profiler(profiler_config)
Add a profiler to the current Data Designer configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profiler_config
|
ColumnProfilerConfigT
|
The profiler configuration object to add. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Raises:
| Type | Description |
|---|---|
BuilderConfigurationError
|
If the profiler configuration is of an invalid type. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | |
add_tool_config(tool_config)
Add a tool configuration to the current Data Designer configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool_config
|
ToolConfig
|
The tool configuration to add. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Raises:
| Type | Description |
|---|---|
BuilderConfigurationError
|
If a tool configuration with the same alias already exists. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
build()
Build a DataDesignerConfig instance based on the current builder configuration.
Returns:
| Type | Description |
|---|---|
DataDesignerConfig
|
The current Data Designer config object. |
Raises:
| Type | Description |
|---|---|
BuilderConfigurationError
|
If any ToolConfig has duplicate tool names in its allow_tools list. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | |
delete_column(column_name)
Delete the column with the given name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_name
|
str
|
Name of the column to delete. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Raises:
| Type | Description |
|---|---|
BuilderConfigurationError
|
If trying to delete a seed dataset column. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | |
delete_constraints(target_column)
Delete all constraints for the given target column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_column
|
str
|
Name of the column to remove constraints for. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
508 509 510 511 512 513 514 515 516 517 518 | |
delete_model_config(alias)
Delete a model configuration from the current Data Designer configuration by alias.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str
|
The alias of the model configuration to delete. |
required |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
222 223 224 225 226 227 228 229 230 231 232 233 | |
delete_tool_config(alias)
Delete a tool configuration from the current Data Designer configuration by alias.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str
|
The alias of the tool configuration to delete. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
255 256 257 258 259 260 261 262 263 264 265 | |
from_config(config)
classmethod
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:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict | str | Path | BuilderConfig
|
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 |
required |
Returns:
| Type | Description |
|---|---|
Self
|
A new instance populated with the configuration from the provided source. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the config format is invalid. |
ValidationError
|
If the builder config loaded from the config is invalid. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_builder_config()
Get the builder config for the current Data Designer configuration.
Returns:
| Type | Description |
|---|---|
BuilderConfig
|
The builder config. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
697 698 699 700 701 702 703 | |
get_column_config(name)
Get a column configuration by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the column to retrieve the config for. |
required |
Returns:
| Type | Description |
|---|---|
ColumnConfigT
|
The column configuration object. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no column with the given name exists. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
537 538 539 540 541 542 543 544 545 546 547 548 549 | |
get_column_configs()
Get all column configurations.
Returns:
| Type | Description |
|---|---|
list[ColumnConfigT]
|
A list of all column configuration objects. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
551 552 553 554 555 556 557 | |
get_columns_excluding_type(column_type)
Get all column configurations excluding the specified type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_type
|
DataDesignerColumnType
|
The type of columns to exclude. |
required |
Returns:
| Type | Description |
|---|---|
list[ColumnConfigT]
|
A list of column configurations that do not match the specified type. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
599 600 601 602 603 604 605 606 607 608 609 | |
get_columns_of_type(column_type)
Get all column configurations of the specified type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_type
|
DataDesignerColumnType
|
The type of columns to filter by. |
required |
Returns:
| Type | Description |
|---|---|
list[ColumnConfigT]
|
A list of column configurations matching the specified type. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
587 588 589 590 591 592 593 594 595 596 597 | |
get_constraints(target_column)
Get all constraints for the given target column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_column
|
str
|
Name of the column to get constraints for. |
required |
Returns:
| Type | Description |
|---|---|
list[ColumnConstraintT]
|
A list of constraint objects targeting the specified column. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
576 577 578 579 580 581 582 583 584 585 | |
get_processor_configs()
Get processor configuration objects.
Returns:
| Type | Description |
|---|---|
list[ProcessorConfigT]
|
A list of processor configuration objects. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
611 612 613 614 615 616 617 | |
get_profilers()
Get all profilers.
Returns:
| Type | Description |
|---|---|
list[ColumnProfilerConfigT]
|
A list of profiler configuration objects. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
455 456 457 458 459 460 461 | |
get_seed_config()
Get the seed config for the current Data Designer configuration.
Returns:
| Type | Description |
|---|---|
SeedConfig | None
|
The seed config if configured, None otherwise. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
619 620 621 622 623 624 625 | |
get_tool_config(alias)
Get a tool configuration by alias.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str
|
The alias of the tool configuration to retrieve. |
required |
Returns:
| Type | Description |
|---|---|
ToolConfig
|
The tool configuration object. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If no tool configuration with the given alias exists. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 | |
num_columns_of_type(column_type)
Get the count of columns of the specified type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_type
|
DataDesignerColumnType
|
The type of columns to count. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of columns matching the specified type. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
627 628 629 630 631 632 633 634 635 636 | |
with_seed_dataset(seed_source, *, sampling_strategy=SamplingStrategy.ORDERED, selection_strategy=None)
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:
| Name | Type | Description | Default |
|---|---|---|---|
seed_source
|
SeedSourceT
|
The pointer to the seed dataset. |
required |
sampling_strategy
|
SamplingStrategy
|
The sampling strategy to use when generating data from the seed dataset. Defaults to ORDERED sampling. |
ORDERED
|
selection_strategy
|
IndexRange | PartitionBlock | None
|
An optional selection strategy to use when generating data from the seed dataset. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
The current Data Designer config builder instance. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 | |
write_config(path, indent=2, **kwargs)
Write the current configuration to a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Path to the file to write the configuration to. |
required |
indent
|
int | None
|
Indentation level for the output file (default: 2). |
2
|
**kwargs
|
Additional keyword arguments passed to the serialization methods used. |
{}
|
Raises:
| Type | Description |
|---|---|
BuilderConfigurationError
|
If the file format is unsupported. |
BuilderSerializationError
|
If the configuration cannot be serialized. |
Source code in packages/data-designer-config/src/data_designer/config/config_builder.py
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | |