Skip to content
SupportLogin
Adaptive Data
Edit on GitHub

Combine datasets

Validate and merge multiple Adaptive Data datasets into one new dataset with the Python SDK.

Combine datasets when related training examples are spread across multiple Adaptive Data results. Combining creates a new dataset and leaves every source dataset unchanged.

Each source must belong to your organization and have completed an Adaptive Data run. The examples assume you have configured the Python SDK.

Validate the datasets before combining them. Validation checks compatibility without writing data:

from adaption import Adaption
client = Adaption()
dataset_ids = [
"dataset_abc123",
"dataset_def456",
]
validation = client.datasets.combine.validate(dataset_ids=dataset_ids)
for issue in validation.issues:
print(issue.level, issue.code, issue.message)
if not validation.compatible:
raise ValueError("The datasets cannot be combined")
print(validation.training_type, validation.total_estimated_rows)

Each validation issue has a level, stable code, and user-facing message:

  • Errors block the combine. For example, a source might not be ready, might belong to another organization, or might mix text and multimodal data.
  • Warnings describe changes the combine operation can make automatically. It can cast mismatched column types to a common type or resolve mixed training types to an instruction dataset.

See the combine.validate reference for all validation fields and issue codes.

Pass the same source IDs to combine.create and give the output dataset a name:

from uuid import uuid4
idempotency_key = str(uuid4())
combined = client.datasets.combine.create(
dataset_ids=dataset_ids,
name="Combined support data",
idempotency_key=idempotency_key,
)
print(combined.dataset_id)

The request runs synchronously and returns the new dataset_id after the merge finishes. There is no public combine-job polling flow.

Datasets with the same training type preserve that type. Combining instruction and preference datasets produces an instruction dataset. Other warning-level reconciliation is reported by validation before you start the merge.

See the combine.create reference for current request requirements and response fields.