Skip to content
SupportLogin
Validate that a set of Datasets can be combined

Validate that a set of Datasets can be combined

datasets.combine.validate(CombineValidateParams**kwargs) -> CombineValidateResponse
POST/api/v1/datasets/combine/validate

Synchronous compatibility check. Returns a single issues array containing both blockers (level: "error") and reconcilable concerns (level: "warning"). compatible: false means at least one error-level issue is present (cardinality, ownership, status, run_id). Warning-level entries — column-type mismatches, DPO sources missing ranked generations — are non-blocking; the merge resolves them automatically (mixed types downgrade to instruction_dataset, type mismatches CAST to a common type, etc.). Nothing is written.

ParametersExpand Collapse
dataset_ids: Sequence[str]

Source Dataset IDs to combine. Must all belong to the caller’s org and be in a combinable state.

ReturnsExpand Collapse
class CombineValidateResponse: …
compatible: bool

Whether the proposed merge can proceed.

training_type: Optional[Literal["instruction_dataset", "preference_pairs"]]

Resolved training type for a compatible merge. Homogeneous source sets inherit their shared type; mixed instruction + preference sets resolve to instruction_dataset.

One of the following:
"instruction_dataset"
"preference_pairs"
total_estimated_rows: Optional[float]

Sum of processed_rows across all sources for a compatible merge.

issues: List[Issue]

Validation diagnostics. Errors block the merge; warnings describe reconciliation the merge performs automatically.

code: Literal["too_few_sources", "too_many_sources", "duplicate_source_ids", 9 more]

Stable machine-readable validation issue code.

One of the following:
"too_few_sources"
"too_many_sources"
"duplicate_source_ids"
"dataset_not_found"
"wrong_organization"
"dataset_not_ready"
"missing_run_id"
"mixed_multimodal_sources"
"all_preference_sources_missing_dpo_columns"
"incompatible_column_types"
"preference_source_missing_ranked_generations"
"mixed_training_types_resolved_to_sft"
level: Literal["error", "warning"]

error blocks the merge; warning describes automatic reconciliation.

One of the following:
"error"
"warning"
message: str

Preformed user-facing message.

count: Optional[float]
limit: Optional[float]
dataset_id: Optional[str]
status: Optional[str]
dataset_ids: Optional[List[str]]
multimodal_dataset_ids: Optional[List[str]]
text_dataset_ids: Optional[List[str]]
columns: Optional[List[IssueColumn]]
column: str

Column whose source types do not agree.

types: List[IssueColumnType]
dataset_id: str

Source Dataset ID.

type: str

DuckDB type observed for this Dataset.

cast_to: str

Common DuckDB type used by the merge.

types: Optional[List[IssueType]]
dataset_id: str

Source Dataset ID.

training_type: Literal["instruction_dataset", "preference_pairs"]

Training type resolved for this source Dataset.

One of the following:
"instruction_dataset"
"preference_pairs"

Validate that a set of Datasets can be combined

import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
response = client.datasets.combine.validate(
    dataset_ids=["string", "string"],
)
print(response.compatible)
{
  "compatible": true,
  "training_type": "instruction_dataset",
  "total_estimated_rows": 0,
  "issues": [
    {
      "code": "too_few_sources",
      "level": "error",
      "message": "message",
      "count": 0,
      "limit": 0,
      "dataset_id": "dataset_id",
      "status": "status",
      "dataset_ids": [
        "string"
      ],
      "multimodal_dataset_ids": [
        "string"
      ],
      "text_dataset_ids": [
        "string"
      ],
      "columns": [
        {
          "column": "column",
          "types": [
            {
              "dataset_id": "dataset_id",
              "type": "type"
            }
          ],
          "cast_to": "cast_to"
        }
      ],
      "types": [
        {
          "dataset_id": "dataset_id",
          "training_type": "instruction_dataset"
        }
      ]
    }
  ]
}
Returns Examples
{
  "compatible": true,
  "training_type": "instruction_dataset",
  "total_estimated_rows": 0,
  "issues": [
    {
      "code": "too_few_sources",
      "level": "error",
      "message": "message",
      "count": 0,
      "limit": 0,
      "dataset_id": "dataset_id",
      "status": "status",
      "dataset_ids": [
        "string"
      ],
      "multimodal_dataset_ids": [
        "string"
      ],
      "text_dataset_ids": [
        "string"
      ],
      "columns": [
        {
          "column": "column",
          "types": [
            {
              "dataset_id": "dataset_id",
              "type": "type"
            }
          ],
          "cast_to": "cast_to"
        }
      ],
      "types": [
        {
          "dataset_id": "dataset_id",
          "training_type": "instruction_dataset"
        }
      ]
    }
  ]
}