Run Config
RunConfig controls dataset generation behavior, including early shutdown thresholds,
batch sizing, non-inference worker concurrency, and the Jinja rendering engine used by
the runtime.
JinjaRenderingEngine.SECURE is the default. Set JinjaRenderingEngine.NATIVE
when you want Jinja2's broader built-in sandbox behavior instead of Data Designer's
hardened renderer.
For guidance on when to use each mode, see Security.
Usage
import data_designer.config as dd
from data_designer.interface import DataDesigner
data_designer = DataDesigner()
data_designer.set_run_config(dd.RunConfig(
buffer_size=500,
max_conversation_restarts=3,
jinja_rendering_engine=dd.JinjaRenderingEngine.NATIVE,
))
API Reference
Classes:
| Name | Description |
|---|---|
JinjaRenderingEngine |
Template renderer used by the engine for user-supplied Jinja templates. |
RequestAdmissionTuningConfig |
Advanced request-admission AIMD tuning for model API calls. |
RunConfig |
Runtime configuration for dataset generation. |
ThrottleConfig |
Deprecated compatibility DTO for request-admission tuning. |
JinjaRenderingEngine
Bases: StrEnum
Template renderer used by the engine for user-supplied Jinja templates.
RequestAdmissionTuningConfig
Bases: ConfigBase
Advanced request-admission AIMD tuning for model API calls.
Most workloads should tune model capacity with max_parallel_requests on
inference parameters. These fields adjust the adaptive recovery behavior
below that cap and are intended for provider/runtime support cases.
RunConfig
Bases: ConfigBase
Runtime configuration for dataset generation.
Groups configuration options that control generation behavior but aren't part of the dataset configuration itself.
Attributes:
| Name | Type | Description |
|---|---|---|
disable_early_shutdown |
bool
|
If True, disables the executor's early-shutdown behavior entirely. Generation will continue regardless of error rate, and the early-shutdown exception will never be raised. Error counts and summaries are still collected. Default is False. |
shutdown_error_rate |
float
|
Error rate threshold (0.0-1.0) that triggers early shutdown when early shutdown is enabled. Default is 0.5. |
shutdown_error_window |
int
|
Minimum number of completed tasks before error rate monitoring begins. Must be >= 1. Default is 10. |
buffer_size |
int
|
Number of records to process in each batch during dataset generation. A batch is processed end-to-end (column generation, post-batch processors, and writing the batch to artifact storage) before moving on to the next batch. Must be > 0. Default is 1000. |
non_inference_max_parallel_workers |
int
|
Maximum number of worker threads used for non-inference cell-by-cell generators. Must be >= 1. Default is 4. |
max_conversation_restarts |
int
|
Maximum number of full conversation restarts permitted when
generation tasks call |
max_conversation_correction_steps |
int
|
Maximum number of correction rounds permitted within a
single conversation when generation tasks call |
async_trace |
bool
|
If True, collect per-task tracing data when using the async engine (DATA_DESIGNER_ASYNC_ENGINE=1). Has no effect on the sync path. Default is False. |
progress_bar |
bool
|
If True, display sticky ANSI progress bars instead of periodic log lines during generation. Requires a TTY; falls back to log lines in non-TTY environments. Default is False. |
progress_interval |
float
|
How often (in seconds) the async progress reporter emits a consolidated log block. Must be > 0. Default is 5.0. |
jinja_rendering_engine |
JinjaRenderingEngine
|
Template renderer used for engine-side Jinja evaluation.
|
request_admission |
RequestAdmissionTuningConfig | None
|
Advanced AIMD request-admission tuning for provider/model calls.
Most users should leave this unset and tune |
Notes
Request-admission controller internals remain engine-owned. This field exposes only the supported tuning DTO and does not expose controller mutation APIs, leases, queues, or pressure snapshots.
Methods:
| Name | Description |
|---|---|
normalize_shutdown_settings |
Normalize shutdown settings for compatibility. |
normalize_shutdown_settings()
Normalize shutdown settings for compatibility.
Source code in packages/data-designer-config/src/data_designer/config/run_config.py
207 208 209 210 211 212 | |
ThrottleConfig
Bases: ConfigBase
Deprecated compatibility DTO for request-admission tuning.
Use RequestAdmissionTuningConfig via RunConfig.request_admission
instead. ceiling_overshoot is accepted for compatibility but is not
forwarded because request admission no longer exposes an overshoot knob.
Methods:
| Name | Description |
|---|---|
to_request_admission_tuning |
Translate legacy throttle tuning into the request-admission DTO. |
to_request_admission_tuning()
Translate legacy throttle tuning into the request-admission DTO.
Source code in packages/data-designer-config/src/data_designer/config/run_config.py
108 109 110 111 112 113 114 115 116 | |