Skip to content
Get started

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
file_format: Literal["csv", "json", "jsonl", "parquet"]

Format of the uploaded file

One of the following:
"csv"
"json"
"jsonl"
"parquet"
file_size_bytes: float

Size of the uploaded file in bytes

minimum0
maximum2147483648
name: str

Human-readable name for the dataset

s3_key: str

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

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