Skip to content
SupportLogin

Complete a dataset upload and trigger processing

datasets.upload.complete(UploadCompleteParams**kwargs) -> UploadCompleteResponse
POST/api/v1/datasets/upload/complete

Complete a dataset upload and trigger processing

ParametersExpand Collapse
s3_key: str

S3 object key returned in the pre-signed URL response from /upload/initiate

name: str

Human-readable name for the dataset

file_format: Literal["csv", "json", "jsonl", 8 more]

Format of the uploaded file

One of the following:
"csv"
"json"
"jsonl"
"parquet"
"pdf"
"docx"
"pptx"
"xlsx"
"html"
"zip"
"txt"
file_size_bytes: float

Size of the uploaded file in bytes

minimum0
maximum2147483648
defer_adaption: Optional[bool]

When true, the upload is stored but Adaptive Data does not start. The dataset stays in awaiting_preprocessing until POST /datasets/:id/start-adaption.

ReturnsExpand Collapse
class UploadCompleteResponse:
dataset_id: str

ID of the newly created dataset

Complete a dataset upload and trigger processing

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.upload.complete(
    s3_key="uploads/550e8400-e29b-41d4-a716-446655440000/my-training-data.csv",
    name="my-training-data",
    file_format="csv",
    file_size_bytes=1048576,
)
print(response.dataset_id)
{
  "dataset_id": "550e8400-e29b-41d4-a716-446655440000"
}
Returns Examples
{
  "dataset_id": "550e8400-e29b-41d4-a716-446655440000"
}