DataDesigner Interface
DataDesigner validates configs, generates in-memory previews, creates persisted datasets, lists configured MCP tools, and exposes default model settings.
For runtime settings passed through set_run_config(), see run_config. For persisted creation results returned by create(), see results.
DataDesigner
Bases: DataDesignerInterface[DatasetCreationResults]
Main interface for creating datasets with Data Designer.
This class provides the primary interface for building synthetic datasets using Data Designer configurations. It manages model providers, artifact storage, and orchestrates the dataset creation and profiling processes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_path
|
Path | str | None
|
Path where generated artifacts will be stored. If not
provided, artifacts are stored in an |
None
|
model_providers
|
list[ModelProvider] | None
|
Optional list of model providers for LLM generation. If None, uses default providers. |
None
|
secret_resolver
|
SecretResolver | None
|
Resolver for handling secrets and credentials. If None, uses the default composite resolver, which checks environment variables and plaintext values. |
None
|
seed_readers
|
list[SeedReader] | None
|
Optional list of seed readers. If None, uses default readers. |
None
|
managed_assets_path
|
Path | str | None
|
Path to the managed assets directory. This is used to point
to the location of managed datasets and other assets used during dataset generation.
If not provided, will check for an environment variable called DATA_DESIGNER_MANAGED_ASSETS_PATH.
If the environment variable is not set, will use the default managed assets directory, which
is defined in |
None
|
person_reader
|
PersonReader | None
|
Optional custom reader for person datasets. If provided, this reader will be used instead of the default local reader. This allows clients to customize how managed datasets are accessed (e.g., using custom fsspec clients for S3 or other remote storage). |
None
|
mcp_providers
|
list[MCPProviderT] | None
|
Optional list of MCP provider configurations to enable tool-calling for LLM generation columns. Supports both MCPProvider (remote SSE or Streamable HTTP) and LocalStdioMCPProvider (local subprocess). |
None
|
Methods:
| Name | Description |
|---|---|
acreate |
Async wrapper for creating a dataset without blocking the caller's event loop. |
compose_workflow |
Create an experimental composite workflow. |
create |
Create dataset and save results to the local artifact storage. |
get_default_model_configs |
Get the default model configurations. |
get_default_model_providers |
Get the default model providers. |
get_models |
Get a dict of ModelFacade instances for custom column development. |
list_mcp_tool_names |
Connect to a configured MCP provider and return the names of its available tools. |
preview |
Generate preview dataset for fast iteration on your Data Designer configuration. |
set_run_config |
Set the runtime configuration for dataset generation. |
validate |
Validate the Data Designer configuration as defined by the DataDesignerConfigBuilder |
Attributes:
| Name | Type | Description |
|---|---|---|
artifact_path |
Path
|
Directory where Data Designer writes artifacts by default. |
info |
InterfaceInfo
|
Get information about the Data Designer interface. |
model_provider_registry |
ModelProviderRegistry
|
Get the resolved model provider registry. |
run_config |
RunConfig
|
Get the runtime configuration applied to dataset generation. |
secret_resolver |
SecretResolver
|
Get the secret resolver used by this DataDesigner instance. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
artifact_path
property
Directory where Data Designer writes artifacts by default.
info
property
Get information about the Data Designer interface.
Returns:
| Type | Description |
|---|---|
InterfaceInfo
|
InterfaceInfo object with information about the Data Designer interface. |
model_provider_registry
property
Get the resolved model provider registry.
Returns:
| Type | Description |
|---|---|
ModelProviderRegistry
|
The ModelProviderRegistry containing the providers resolved at |
ModelProviderRegistry
|
construction time, either the user-supplied |
ModelProviderRegistry
|
list or the providers loaded from the YAML. |
run_config
property
Get the runtime configuration applied to dataset generation.
Returns:
| Type | Description |
|---|---|
RunConfig
|
The active RunConfig instance. Note that |
RunConfig
|
some fields on construction (e.g., |
RunConfig
|
|
RunConfig
|
object may not exactly equal the one originally passed to |
RunConfig
|
|
secret_resolver
property
Get the secret resolver used by this DataDesigner instance.
Returns:
| Type | Description |
|---|---|
SecretResolver
|
The SecretResolver instance handling credentials and secrets. |
acreate(config_builder, *, num_records=DEFAULT_NUM_RECORDS, dataset_name='dataset', resume=ResumeMode.NEVER, artifact_path=None)
async
Async wrapper for creating a dataset without blocking the caller's event loop.
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 | |
compose_workflow(*, name)
Create an experimental composite workflow.
Workflow chaining is experimental and its API, metadata schema, and artifact layout may change in future releases.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Workflow name used for the artifact directory. |
required |
Returns:
| Type | Description |
|---|---|
CompositeWorkflow
|
A composite workflow that can run named stages in sequence. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
470 471 472 473 474 475 476 477 478 479 480 481 482 | |
create(config_builder, *, num_records=DEFAULT_NUM_RECORDS, dataset_name='dataset', resume=ResumeMode.NEVER, artifact_path=None, on_batch_complete=None)
Create dataset and save results to the local artifact storage.
This method orchestrates the full dataset creation pipeline including building the dataset according to the configuration, profiling the generated data, and storing artifacts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_builder
|
DataDesignerConfigBuilder
|
The DataDesignerConfigBuilder containing the dataset configuration (columns, constraints, seed data, etc.). |
required |
num_records
|
int
|
Number of records to generate. |
DEFAULT_NUM_RECORDS
|
dataset_name
|
str
|
Name of the dataset. This name will be used as the dataset folder name in the artifact path directory. If a non-empty directory with the same name already exists, dataset will be saved to a new directory with a datetime stamp. For example, if the dataset name is "awesome_dataset" and a directory with the same name already exists, the dataset will be saved to a new directory with the name "awesome_dataset_2025-01-01_12-00-00". |
'dataset'
|
resume
|
ResumeMode
|
Controls how interrupted runs are handled.
In all resume modes, in-flight partial results from the interrupted run are discarded before generation continues. |
NEVER
|
artifact_path
|
Path | str | None
|
Optional artifact root for this create call. Defaults to the path configured on this DataDesigner instance. |
None
|
on_batch_complete
|
Callable[[Path], None] | None
|
Optional callback called with the completed batch artifact path after
each batch is written. Useful for incremental workflows such as uploading each batch
to remote storage, updating an external run monitor, or triggering downstream processing
before the full dataset has finished. The callback runs synchronously in the generation
path, so it is recommended to keep it lightweight or delegate slow work to a queue, e.g.
|
None
|
Returns:
| Type | Description |
|---|---|
DatasetCreationResults
|
DatasetCreationResults object with methods for loading the generated dataset, |
DatasetCreationResults
|
analysis results, and displaying sample records for inspection. |
Raises:
| Type | Description |
|---|---|
DataDesignerGenerationError
|
If an error occurs during dataset generation. |
DataDesignerProfilingError
|
If an error occurs during dataset profiling. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 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 312 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 364 365 366 367 | |
get_default_model_configs()
Get the default model configurations.
Returns:
| Type | Description |
|---|---|
list[ModelConfig]
|
List of default model configurations. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
506 507 508 509 510 511 512 513 | |
get_default_model_providers()
Get the default model providers.
Returns:
| Type | Description |
|---|---|
list[ModelProvider]
|
List of default model providers. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
515 516 517 518 519 520 521 522 | |
get_models(model_aliases)
Get a dict of ModelFacade instances for custom column development.
Use this to experiment with custom column generator functions outside of
the full pipeline. The returned dict matches the models argument passed
to 3-arg custom column functions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_aliases
|
list[str]
|
List of model aliases to include in the dict. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, ModelFacade]
|
Dict mapping alias to ModelFacade instance. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | |
list_mcp_tool_names(mcp_provider_name, *, timeout_sec=10.0)
Connect to a configured MCP provider and return the names of its available tools.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mcp_provider_name
|
str
|
The |
required |
timeout_sec
|
float
|
Timeout in seconds for the MCP handshake. Defaults to 10. |
10.0
|
Returns:
| Type | Description |
|---|---|
list[str]
|
A list of tool name strings exposed by the MCP server. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no provider with the given name was configured. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
preview(config_builder, *, num_records=DEFAULT_NUM_RECORDS)
Generate preview dataset for fast iteration on your Data Designer configuration.
All preview results are stored in memory. Once you are satisfied with the preview,
use the create method to generate data at a larger scale and save results to disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_builder
|
DataDesignerConfigBuilder
|
The DataDesignerConfigBuilder containing the dataset configuration (columns, constraints, seed data, etc.). |
required |
num_records
|
int
|
Number of records to generate. |
DEFAULT_NUM_RECORDS
|
Returns:
| Type | Description |
|---|---|
PreviewResults
|
PreviewResults object with methods for inspecting the results. |
Raises:
| Type | Description |
|---|---|
DataDesignerGenerationError
|
If an error occurs during preview dataset generation. |
DataDesignerEarlyShutdownError
|
If preview terminated via the early-shutdown gate
with zero records produced. Subclass of |
DataDesignerProfilingError
|
If an error occurs during preview dataset profiling. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | |
set_run_config(run_config)
Set the runtime configuration for dataset generation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_config
|
RunConfig
|
A RunConfig instance containing runtime settings such as
early shutdown behavior, batch sizing via |
required |
Notes
When disable_early_shutdown=True, DataDesigner will never terminate generation early
due to error-rate thresholds. Errors are still tracked for reporting.
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
557 558 559 560 561 562 563 564 565 566 567 568 569 570 | |
validate(config_builder)
Validate the Data Designer configuration as defined by the DataDesignerConfigBuilder with the configured engine components (SecretResolver, SeedReaders, etc.).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_builder
|
DataDesignerConfigBuilder
|
The DataDesignerConfigBuilder containing the dataset configuration (columns, constraints, seed data, etc.). |
required |
Returns:
| Type | Description |
|---|---|
None
|
None if the configuration is valid. |
Raises:
| Type | Description |
|---|---|
InvalidConfigError
|
If the configuration is invalid. |
Source code in packages/data-designer/src/data_designer/interface/data_designer.py
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | |