Skip to content
SupportLogin

Get a dataset by ID

datasets.get(strdataset_id) -> Dataset
GET/api/v1/datasets/{dataset_id}

Get a dataset by ID

ParametersExpand Collapse
dataset_id: str
ReturnsExpand Collapse
class Dataset:
dataset_id: str

Unique dataset identifier

kind: Optional[Literal["uploaded", "combined", "invented", 3 more]]

How this dataset came about. uploaded was supplied by you, combined merges several datasets, invented was generated from a prompt, augmented adds rows retrieved from the curated pool to another dataset, and translated / localized add translated copies of another dataset’s rows.

One of the following:
"uploaded"
"combined"
"invented"
"augmented"
"translated"
"localized"
source_dataset_id: Optional[str]

The dataset this one was derived from. Set when kind is augmented, translated or localized. Null for uploaded and invented, and for combined, which has several sources rather than one.

name: Optional[str]

Human-readable name for the dataset

status: Literal["pending", "running", "succeeded", "failed"]

Lifecycle status: pending, running, succeeded, or failed

One of the following:
"pending"
"running"
"succeeded"
"failed"
created_at: datetime

Timestamp when the dataset was created

formatdate-time
created_by_user_id: Optional[str]

User who created the dataset

formatuuid
updated_at: datetime

Timestamp of the last update

formatdate-time
row_count: Optional[int]

Total number of rows in the dataset

configured_column_mapping: Optional[ConfiguredColumnMapping]

User-configured column mapping. Null if not yet configured.

prompt: Optional[str]
completion: Optional[str]
chat: Optional[str]
context: List[str]
image: Optional[str]
evaluation_summary: Optional[EvaluationSummary]

Compact evaluation summary. Null if evaluation has not completed.

grade_before: Optional[str]

Letter grade (A-E) before adaptation

grade_after: Optional[str]

Letter grade (A-E) after adaptation

score_before: Optional[float]

Quality score before adaptation

score_after: Optional[float]

Quality score after adaptation

improvement_percent: Optional[float]

Relative improvement percentage

run_id: Optional[str]

ID of the currently active run

progress: Optional[Progress]

Processing progress. Null when no run is active.

percent: Optional[int]

Progress percentage (0-100)

processed_rows: Optional[int]

Number of rows processed so far

total_rows: Optional[int]

Total rows to process (samples_to_process or row_count)

error_data: Optional[ErrorData]

Error details if the dataset failed. Null otherwise.

message: Optional[str]

Error message

code: Optional[str]

Stable error code when the failure was structured (e.g. E0100)

level: Optional[Literal["error", "warning"]]

Severity when known

One of the following:
"error"
"warning"
image_column_formats: Optional[Dict[str, Literal["embedded_bytes", "url", "file_reference"]]]

Per-column export encoding for detected image columns (column name → format). Use with GET /datasets/{dataset_id}/download: look up the active image column (mapped image column that is also in configured_column_mapping.context) to determine how each row’s original_image is encoded. Null or empty when no image columns were detected.

One of the following:
"embedded_bytes"
"url"
"file_reference"

Get a dataset by ID

import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
dataset = client.datasets.get(
    "dataset_id",
)
print(dataset.dataset_id)
{
  "dataset_id": "dataset_id",
  "kind": "augmented",
  "source_dataset_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "name",
  "status": "pending",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by_user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "row_count": 0,
  "configured_column_mapping": {
    "prompt": "prompt",
    "completion": "completion",
    "chat": "chat",
    "context": [
      "string"
    ],
    "image": "image"
  },
  "evaluation_summary": {
    "grade_before": "grade_before",
    "grade_after": "grade_after",
    "score_before": 0,
    "score_after": 0,
    "improvement_percent": 0
  },
  "run_id": "run_id",
  "progress": {
    "percent": 0,
    "processed_rows": 0,
    "total_rows": 0
  },
  "error_data": {
    "message": "message",
    "code": "code",
    "level": "error"
  },
  "image_column_formats": {
    "foo": "embedded_bytes"
  }
}
Returns Examples
{
  "dataset_id": "dataset_id",
  "kind": "augmented",
  "source_dataset_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "name",
  "status": "pending",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by_user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "row_count": 0,
  "configured_column_mapping": {
    "prompt": "prompt",
    "completion": "completion",
    "chat": "chat",
    "context": [
      "string"
    ],
    "image": "image"
  },
  "evaluation_summary": {
    "grade_before": "grade_before",
    "grade_after": "grade_after",
    "score_before": 0,
    "score_after": 0,
    "improvement_percent": 0
  },
  "run_id": "run_id",
  "progress": {
    "percent": 0,
    "processed_rows": 0,
    "total_rows": 0
  },
  "error_data": {
    "message": "message",
    "code": "code",
    "level": "error"
  },
  "image_column_formats": {
    "foo": "embedded_bytes"
  }
}