๐ฆ Import the essentialsยถ
- The
essentialsmodule provides quick access to the most commonly used objects.
from data_designer.essentials import (
CategorySamplerParams,
DataDesigner,
DataDesignerConfigBuilder,
InferenceParameters,
LLMTextColumnConfig,
ModelConfig,
PersonFromFakerSamplerParams,
SamplerColumnConfig,
SamplerType,
SubcategorySamplerParams,
UniformSamplerParams,
)
โ๏ธ Initialize the Data Designer interfaceยถ
DataDesigneris the main object is responsible for managing the data generation process.When initialized without arguments, the default model providers are used.
data_designer = DataDesigner()
๐๏ธ Define model configurationsยถ
Each
ModelConfigdefines a model that can be used during the generation process.The "model alias" is used to reference the model in the Data Designer config (as we will see below).
The "model provider" is the external service that hosts the model (see the model config docs for more details).
By default, we use build.nvidia.com as the model provider.
# This name is set in the model provider configuration.
MODEL_PROVIDER = "nvidia"
# The model ID is from build.nvidia.com.
MODEL_ID = "nvidia/nvidia-nemotron-nano-9b-v2"
# We choose this alias to be descriptive for our use case.
MODEL_ALIAS = "nemotron-nano-v2"
# This sets reasoning to False for the nemotron-nano-v2 model.
SYSTEM_PROMPT = "/no_think"
model_configs = [
ModelConfig(
alias=MODEL_ALIAS,
model=MODEL_ID,
provider=MODEL_PROVIDER,
inference_parameters=InferenceParameters(
temperature=0.5,
top_p=1.0,
max_tokens=1024,
),
)
]
๐๏ธ Initialize the Data Designer Config Builderยถ
The Data Designer config defines the dataset schema and generation process.
The config builder provides an intuitive interface for building this configuration.
The list of model configs is provided to the builder at initialization.
config_builder = DataDesignerConfigBuilder(model_configs=model_configs)
๐ฒ Getting started with sampler columnsยถ
Sampler columns offer non-LLM based generation of synthetic data.
They are particularly useful for steering the diversity of the generated data, as we demonstrate below.
You can view available samplers using the config builder's info property:
config_builder.info.display("samplers")
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ NeMo Data Designer Samplers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโ โ Type โ Parameter โ Data Type โ Required โ Constraints โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ bernoulli โ p โ number โ โ โ >= 0.0, <= 1.0 โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ bernoulli_mixture โ p โ number โ โ โ >= 0.0, <= 1.0 โ โ โ dist_name โ string โ โ โ โ โ โ dist_params โ dict โ โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ binomial โ n โ integer โ โ โ โ โ โ p โ number โ โ โ >= 0.0, <= 1.0 โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ category โ values โ string[] | integer[] | number[] โ โ โ len > 1 โ โ โ weights โ number[] | null โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ datetime โ start โ string โ โ โ โ โ โ end โ string โ โ โ โ โ โ unit โ string โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ gaussian โ mean โ number โ โ โ โ โ โ stddev โ number โ โ โ โ โ โ decimal_places โ integer | null โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ person โ locale โ string โ โ โ โ โ sex โ string | null โ โ โ โ โ city โ string | string[] | null โ โ โ โ โ age_range โ integer[] โ โ len > 2, len < 2 โ โ โ select_field_values โ object | null โ โ โ โ โ with_synthetic_personas โ boolean โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ person_from_faker โ locale โ string โ โ โ โ โ sex โ string | null โ โ โ โ โ city โ string | string[] | null โ โ โ โ โ age_range โ integer[] โ โ len > 2, len < 2 โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ poisson โ mean โ number โ โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ scipy โ dist_name โ string โ โ โ โ โ โ dist_params โ dict โ โ โ โ โ โ decimal_places โ integer | null โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ subcategory โ category โ string โ โ โ โ โ โ values โ dict โ โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ timedelta โ dt_min โ integer โ โ โ >= 0 โ โ โ dt_max โ integer โ โ โ > 0 โ โ โ reference_column_name โ string โ โ โ โ โ โ unit โ string โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ uniform โ low โ number โ โ โ โ โ โ high โ number โ โ โ โ โ โ decimal_places โ integer | null โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโค โ uuid โ prefix โ string | null โ โ โ โ โ short_form โ boolean โ โ โ โ โ uppercase โ boolean โ โ โ โ โ sampler_type โ string โ โ โ โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
Let's start designing our product review dataset by adding product category and subcategory columns.
config_builder.add_column(
SamplerColumnConfig(
name="product_category",
sampler_type=SamplerType.CATEGORY,
params=CategorySamplerParams(
values=[
"Electronics",
"Clothing",
"Home & Kitchen",
"Books",
"Home Office",
],
),
)
)
config_builder.add_column(
SamplerColumnConfig(
name="product_subcategory",
sampler_type=SamplerType.SUBCATEGORY,
params=SubcategorySamplerParams(
category="product_category",
values={
"Electronics": [
"Smartphones",
"Laptops",
"Headphones",
"Cameras",
"Accessories",
],
"Clothing": [
"Men's Clothing",
"Women's Clothing",
"Winter Coats",
"Activewear",
"Accessories",
],
"Home & Kitchen": [
"Appliances",
"Cookware",
"Furniture",
"Decor",
"Organization",
],
"Books": [
"Fiction",
"Non-Fiction",
"Self-Help",
"Textbooks",
"Classics",
],
"Home Office": [
"Desks",
"Chairs",
"Storage",
"Office Supplies",
"Lighting",
],
},
),
)
)
config_builder.add_column(
SamplerColumnConfig(
name="target_age_range",
sampler_type=SamplerType.CATEGORY,
params=CategorySamplerParams(values=["18-25", "25-35", "35-50", "50-65", "65+"]),
)
)
# Optionally validate that the columns are configured correctly.
config_builder.validate()
[02:31:27] [INFO] โ Validation passed
DataDesignerConfigBuilder( sampler_columns: ['product_category', 'product_subcategory', 'target_age_range'] )
Next, let's add samplers to generate data related to the customer and their review.
config_builder.add_column(
SamplerColumnConfig(
name="customer",
sampler_type=SamplerType.PERSON_FROM_FAKER,
params=PersonFromFakerSamplerParams(age_range=[18, 70], locale="en_US"),
)
)
config_builder.add_column(
SamplerColumnConfig(
name="number_of_stars",
sampler_type=SamplerType.UNIFORM,
params=UniformSamplerParams(low=1, high=5),
convert_to="int", # Convert the sampled float to an integer.
)
)
config_builder.add_column(
SamplerColumnConfig(
name="review_style",
sampler_type=SamplerType.CATEGORY,
params=CategorySamplerParams(
values=["rambling", "brief", "detailed", "structured with bullet points"],
weights=[1, 2, 2, 1],
),
)
)
config_builder.validate()
[02:31:27] [INFO] โ Validation passed
DataDesignerConfigBuilder( sampler_columns: [ "product_category", "product_subcategory", "target_age_range", "customer", "number_of_stars", "review_style" ] )
๐ฆ LLM-generated columnsยถ
The real power of Data Designer comes from leveraging LLMs to generate text, code, and structured data.
When prompting the LLM, we can use Jinja templating to reference other columns in the dataset.
As we see below, nested json fields can be accessed using dot notation.
config_builder.add_column(
LLMTextColumnConfig(
name="product_name",
prompt=(
"You are a helpful assistant that generates product names. DO NOT add quotes around the product name.\n\n"
"Come up with a creative product name for a product in the '{{ product_category }}' category, focusing "
"on products related to '{{ product_subcategory }}'. The target age range of the ideal customer is "
"{{ target_age_range }} years old. Respond with only the product name, no other text."
),
system_prompt=SYSTEM_PROMPT,
model_alias=MODEL_ALIAS,
)
)
config_builder.add_column(
LLMTextColumnConfig(
name="customer_review",
prompt=(
"You are a customer named {{ customer.first_name }} from {{ customer.city }}, {{ customer.state }}. "
"You are {{ customer.age }} years old and recently purchased a product called {{ product_name }}. "
"Write a review of this product, which you gave a rating of {{ number_of_stars }} stars. "
"The style of the review should be '{{ review_style }}'."
),
system_prompt=SYSTEM_PROMPT,
model_alias=MODEL_ALIAS,
)
)
config_builder.validate()
[02:31:27] [INFO] โ Validation passed
DataDesignerConfigBuilder( sampler_columns: [ "product_category", "product_subcategory", "target_age_range", "customer", "number_of_stars", "review_style" ] llm_text_columns: ['product_name', 'customer_review'] )
๐ Iteration is key โย preview the dataset!ยถ
Use the
previewmethod to generate a sample of records quickly.Inspect the results for quality and format issues.
Adjust column configurations, prompts, or parameters as needed.
Re-run the preview until satisfied.
preview = data_designer.preview(config_builder, num_records=2)
[02:31:27] [INFO] ๐ Preview generation in progress
[02:31:27] [INFO] โ Validation passed
[02:31:27] [INFO] โ๏ธ Sorting column configs into a Directed Acyclic Graph
[02:31:27] [INFO] ๐ฉบ Running health checks for models...
[02:31:27] [INFO] |-- ๐ Checking 'nvidia/nvidia-nemotron-nano-9b-v2' in provider named 'nvidia' for model alias 'nemotron-nano-v2'...
[02:31:29] [INFO] |-- โ Passed!
[02:31:29] [INFO] ๐ฒ Preparing samplers to generate 2 records across 6 columns
[02:31:29] [INFO] ๐ Preparing llm-text column generation
[02:31:29] [INFO] |-- column name: 'product_name'
[02:31:29] [INFO] |-- model config:
{
"alias": "nemotron-nano-v2",
"model": "nvidia/nvidia-nemotron-nano-9b-v2",
"inference_parameters": {
"temperature": 0.5,
"top_p": 1.0,
"max_tokens": 1024,
"max_parallel_requests": 4,
"timeout": null,
"extra_body": null
},
"provider": "nvidia"
}
[02:31:29] [INFO] ๐ Processing llm-text column 'product_name' with 4 concurrent workers
[02:31:30] [INFO] ๐ Preparing llm-text column generation
[02:31:30] [INFO] |-- column name: 'customer_review'
[02:31:30] [INFO] |-- model config:
{
"alias": "nemotron-nano-v2",
"model": "nvidia/nvidia-nemotron-nano-9b-v2",
"inference_parameters": {
"temperature": 0.5,
"top_p": 1.0,
"max_tokens": 1024,
"max_parallel_requests": 4,
"timeout": null,
"extra_body": null
},
"provider": "nvidia"
}
[02:31:30] [INFO] ๐ Processing llm-text column 'customer_review' with 4 concurrent workers
[02:31:31] [INFO] ๐ Model usage summary:
{
"nvidia/nvidia-nemotron-nano-9b-v2": {
"token_usage": {
"prompt_tokens": 327,
"completion_tokens": 77,
"total_tokens": 404
},
"request_usage": {
"successful_requests": 4,
"failed_requests": 0,
"total_requests": 4
},
"tokens_per_second": 174,
"requests_per_minute": 103
}
}
[02:31:31] [INFO] ๐ Measuring dataset column statistics:
[02:31:31] [INFO] |-- ๐ฒ column: 'product_category'
[02:31:31] [INFO] |-- ๐ฒ column: 'product_subcategory'
[02:31:31] [INFO] |-- ๐ฒ column: 'target_age_range'
[02:31:31] [INFO] |-- ๐ฒ column: 'customer'
[02:31:31] [INFO] |-- ๐ฒ column: 'number_of_stars'
[02:31:31] [INFO] |-- ๐ฒ column: 'review_style'
[02:31:31] [INFO] |-- ๐ column: 'product_name'
[02:31:31] [INFO] |-- ๐ column: 'customer_review'
[02:31:31] [INFO] ๐ Preview complete!
# Run this cell multiple times to cycle through the 2 preview records.
preview.display_sample_record()
Generated Columns โโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Name โ Value โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ product_category โ Home Office โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ product_subcategory โ Office Supplies โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ target_age_range โ 35-50 โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ customer โ { โ โ โ 'uuid': '2f55b107-c3fe-4f1c-85ff-603aed7b0103', โ โ โ 'locale': 'en_US', โ โ โ 'first_name': 'Karen', โ โ โ 'last_name': 'Solis', โ โ โ 'middle_name': None, โ โ โ 'sex': 'Female', โ โ โ 'street_number': '786', โ โ โ 'street_name': 'Hall Summit', โ โ โ 'city': 'East Catherinefurt', โ โ โ 'state': 'Maryland', โ โ โ 'postcode': '73674', โ โ โ 'age': 38, โ โ โ 'birth_date': '1987-07-05', โ โ โ 'country': 'El Salvador', โ โ โ 'marital_status': 'never_married', โ โ โ 'education_level': 'bachelors', โ โ โ 'unit': '', โ โ โ 'occupation': 'Animal nutritionist', โ โ โ 'phone_number': '001-409-413-7943', โ โ โ 'bachelors_field': 'education' โ โ โ } โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ number_of_stars โ 2 โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ review_style โ brief โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ product_name โ DeskEssentials ProKit โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ customer_review โ **Review:** Overpriced and poorly organized. Expected better quality for the price. Not โ โ โ worth it. โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ [index: 0]
# The preview dataset is available as a pandas DataFrame.
preview.dataset
| product_category | product_subcategory | target_age_range | customer | number_of_stars | review_style | product_name | customer_review | |
|---|---|---|---|---|---|---|---|---|
| 0 | Home Office | Office Supplies | 35-50 | {'uuid': '2f55b107-c3fe-4f1c-85ff-603aed7b0103... | 2 | brief | DeskEssentials ProKit\n | **Review:** Overpriced and poorly organized. E... |
| 1 | Clothing | Accessories | 35-50 | {'uuid': 'fca16937-4c21-4a2d-9b29-72f009983713... | 3 | brief | EleganceEssentials\n | The EleganceEssentials product is decent but n... |
๐ Analyze the generated dataยถ
Data Designer automatically generates a basic statistical analysis of the generated data.
This analysis is available via the
analysisproperty of generation result objects.
# Print the analysis as a table.
preview.analysis.to_report()
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐จ Data Designer Dataset Profile โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Dataset Overview โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ number of records โ number of columns โ percent complete records โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ 2 โ 8 โ 100.0% โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฒ Sampler Columns โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ column name โ data type โ number unique values โ sampler type โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ product_category โ string โ 2 (100.0%) โ category โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ product_subcategory โ string โ 2 (100.0%) โ subcategory โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ target_age_range โ string โ 1 (50.0%) โ category โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ customer โ dict โ 2 (100.0%) โ person_from_faker โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ number_of_stars โ int โ 2 (100.0%) โ uniform โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ review_style โ string โ 1 (50.0%) โ category โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ LLM-Text Columns โโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ prompt tokens โ completion tokens โ โ column name โ data type โ number unique values โ per record โ per record โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ product_name โ string โ 2 (100.0%) โ 77.0 +/- 0.0 โ 6.0 +/- 0.0 โ โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโค โ customer_review โ string โ 2 (100.0%) โ 62.5 +/- 0.5 โ 29.5 +/- 12.0 โ โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Table Notes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ 1. All token statistics are based on a sample of max(1000, len(dataset)) records. โ โ 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Scale up!ยถ
Happy with your preview data?
Use the
createmethod to submit larger Data Designer generation jobs.
results = data_designer.create(config_builder, num_records=10)
[02:31:32] [INFO] ๐จ Creating Data Designer dataset
[02:31:32] [INFO] โ Validation passed
[02:31:32] [INFO] โ๏ธ Sorting column configs into a Directed Acyclic Graph
[02:31:32] [INFO] ๐ฉบ Running health checks for models...
[02:31:32] [INFO] |-- ๐ Checking 'nvidia/nvidia-nemotron-nano-9b-v2' in provider named 'nvidia' for model alias 'nemotron-nano-v2'...
[02:31:33] [INFO] |-- โ Passed!
[02:31:33] [INFO] โณ Processing batch 1 of 1
[02:31:33] [INFO] ๐ฒ Preparing samplers to generate 10 records across 6 columns
[02:31:33] [INFO] ๐ Preparing llm-text column generation
[02:31:33] [INFO] |-- column name: 'product_name'
[02:31:33] [INFO] |-- model config:
{
"alias": "nemotron-nano-v2",
"model": "nvidia/nvidia-nemotron-nano-9b-v2",
"inference_parameters": {
"temperature": 0.5,
"top_p": 1.0,
"max_tokens": 1024,
"max_parallel_requests": 4,
"timeout": null,
"extra_body": null
},
"provider": "nvidia"
}
[02:31:33] [INFO] ๐ Processing llm-text column 'product_name' with 4 concurrent workers
[02:31:37] [INFO] ๐ Preparing llm-text column generation
[02:31:37] [INFO] |-- column name: 'customer_review'
[02:31:37] [INFO] |-- model config:
{
"alias": "nemotron-nano-v2",
"model": "nvidia/nvidia-nemotron-nano-9b-v2",
"inference_parameters": {
"temperature": 0.5,
"top_p": 1.0,
"max_tokens": 1024,
"max_parallel_requests": 4,
"timeout": null,
"extra_body": null
},
"provider": "nvidia"
}
[02:31:37] [INFO] ๐ Processing llm-text column 'customer_review' with 4 concurrent workers
[02:31:53] [INFO] ๐ Model usage summary:
{
"nvidia/nvidia-nemotron-nano-9b-v2": {
"token_usage": {
"prompt_tokens": 1637,
"completion_tokens": 5194,
"total_tokens": 6831
},
"request_usage": {
"successful_requests": 20,
"failed_requests": 0,
"total_requests": 20
},
"tokens_per_second": 348,
"requests_per_minute": 61
}
}
[02:31:53] [INFO] ๐ Measuring dataset column statistics:
[02:31:53] [INFO] |-- ๐ฒ column: 'product_category'
[02:31:53] [INFO] |-- ๐ฒ column: 'product_subcategory'
[02:31:53] [INFO] |-- ๐ฒ column: 'target_age_range'
[02:31:53] [INFO] |-- ๐ฒ column: 'customer'
[02:31:53] [INFO] |-- ๐ฒ column: 'number_of_stars'
[02:31:53] [INFO] |-- ๐ฒ column: 'review_style'
[02:31:53] [INFO] |-- ๐ column: 'product_name'
[02:31:53] [INFO] |-- ๐ column: 'customer_review'
# Load the generated dataset as a pandas DataFrame.
dataset = results.load_dataset()
dataset.head()
| product_category | product_subcategory | target_age_range | customer | number_of_stars | review_style | product_name | customer_review | |
|---|---|---|---|---|---|---|---|---|
| 0 | Home Office | Lighting | 50-65 | {'age': 31, 'bachelors_field': 'no_degree', 'b... | 2 | brief | WarmGlow Desk Lamp | **Review:** Disappointing. The lamp doesnโt ... |
| 1 | Electronics | Accessories | 50-65 | {'age': 58, 'bachelors_field': 'no_degree', 'b... | 4 | brief | ElderGlow Charger | **Title: Good, but could be better** The Eld... |
| 2 | Home Office | Storage | 25-35 | {'age': 51, 'bachelors_field': 'education', 'b... | 3 | brief | NestHub | **Review:** NestHub is okayโeasy to set up b... |
| 3 | Books | Fiction | 35-50 | {'age': 39, 'bachelors_field': 'business', 'bi... | 2 | detailed | Whispers of the Forgotten Realm | **Product Review: Whispers of the Forgotten Re... |
| 4 | Electronics | Cameras | 25-35 | {'age': 21, 'bachelors_field': 'stem', 'birth_... | 2 | detailed | PixelPulse Pro | **Review Title: Disappointing Experience with ... |
# Load the analysis results into memory.
analysis = results.load_analysis()
analysis.to_report()
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐จ Data Designer Dataset Profile โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Dataset Overview โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ number of records โ number of columns โ percent complete records โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ 10 โ 8 โ 100.0% โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฒ Sampler Columns โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ column name โ data type โ number unique values โ sampler type โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ product_category โ string โ 5 (50.0%) โ category โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ product_subcategory โ string โ 8 (80.0%) โ subcategory โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ target_age_range โ string โ 5 (50.0%) โ category โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ customer โ dict โ 10 (100.0%) โ person_from_faker โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ number_of_stars โ int โ 4 (40.0%) โ uniform โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ review_style โ string โ 3 (30.0%) โ category โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ LLM-Text Columns โโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ prompt tokens โ completion tokens โ โ column name โ data type โ number unique values โ per record โ per record โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ product_name โ string โ 9 (90.0%) โ 77.0 +/- 0.5 โ 5.5 +/- 1.0 โ โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโค โ customer_review โ string โ 10 (100.0%) โ 62.5 +/- 1.8 โ 660.0 +/- 400.6 โ โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Table Notes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ 1. All token statistics are based on a sample of max(1000, len(dataset)) records. โ โ 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญ๏ธ Next Stepsยถ
Now that you've seen the basics of Data Designer, check out the following notebooks to learn more about: