Upload rows to a dataset
Add rows to a dataset from a JSONL body, or a CSV one (Content-Type: text/csv) whose
first line is context and some of the dataset’s decision ids. A CSV cell names the right
outcome for its decision, written exactly as the dataset names it, and a blank one leaves
that decision out. CSV adds to datasets of targets only. The default upload limit is 16
MiB. X-Max-Price-Usd is the most you agree to pay for a first day of storage, which rows
that take the dataset past the free size hold. X-Family names the family whose page adds
them, as family does for JSON rows.
curl --request POST \
--url https://console.sqwish.ai/v1/datasets/{dataset_id}/versions/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-ndjson' \
--data '<string>'import requests
url = "https://console.sqwish.ai/v1/datasets/{dataset_id}/versions/upload"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-ndjson"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-ndjson'},
body: '<string>'
};
fetch('https://console.sqwish.ai/v1/datasets/{dataset_id}/versions/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"sha256": "<string>",
"version": 123,
"status": "validated",
"rows": 123,
"contexts": 123,
"duplicates_removed": 123,
"method": "sft",
"augmentation": "none",
"archived_at": 123,
"evaluation_only": true,
"evaluation_fraction": 123,
"split": {},
"prompt_tuning": {
"decisions": [
{
"decision": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"outcomes": [
"<string>"
],
"rows": 123,
"labels": {},
"reason": "conflicting_decision"
}
],
"unlisted": 123
},
"input": {
"format": "json",
"sha256": "<string>",
"bytes": 123
},
"labeling": {
"job_id": "<string>",
"source_id": "<string>",
"source_sha256": "<string>",
"source_input_sha256": "<string>",
"spec_sha256": "<string>",
"prompt_version": "<string>",
"teacher_models": [
"<string>"
],
"row_indices": [
123
],
"selection_sha256": "<string>",
"target_method": "mean_one_hot_teacher_votes"
},
"storage_window": {
"started_at": 123,
"ends_at": 123,
"reserved_usd": "<string>"
},
"labels_to_check": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Headers
The family whose page adds these rows, such as router: one of your families on this dataset. The version records it, so the family can say where its new data came from.
^[a-z](?:-?[a-z0-9]){1,62}$Path Parameters
Body
One JSON object per line, or a CSV whose first line is context and some of the dataset's decision ids, and whose cells name each decision's right outcome.
The body is of type string.
Response
Successful Response
Names every row of the latest version: its first version's file digest, each later one's chained on.
The latest version. Counts and the split are this version's.
"validated"sft, reward "none"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.
Show child attributes
Show child attributes
What prompt tuning can tune in the training partition, worked out when the dataset was made. Datasets of outcome scores have none.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start.
Show child attributes
Show child attributes
How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.
curl --request POST \
--url https://console.sqwish.ai/v1/datasets/{dataset_id}/versions/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-ndjson' \
--data '<string>'import requests
url = "https://console.sqwish.ai/v1/datasets/{dataset_id}/versions/upload"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-ndjson"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/x-ndjson'},
body: '<string>'
};
fetch('https://console.sqwish.ai/v1/datasets/{dataset_id}/versions/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"sha256": "<string>",
"version": 123,
"status": "validated",
"rows": 123,
"contexts": 123,
"duplicates_removed": 123,
"method": "sft",
"augmentation": "none",
"archived_at": 123,
"evaluation_only": true,
"evaluation_fraction": 123,
"split": {},
"prompt_tuning": {
"decisions": [
{
"decision": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"outcomes": [
"<string>"
],
"rows": 123,
"labels": {},
"reason": "conflicting_decision"
}
],
"unlisted": 123
},
"input": {
"format": "json",
"sha256": "<string>",
"bytes": 123
},
"labeling": {
"job_id": "<string>",
"source_id": "<string>",
"source_sha256": "<string>",
"source_input_sha256": "<string>",
"spec_sha256": "<string>",
"prompt_version": "<string>",
"teacher_models": [
"<string>"
],
"row_indices": [
123
],
"selection_sha256": "<string>",
"target_method": "mean_one_hot_teacher_votes"
},
"storage_window": {
"started_at": 123,
"ends_at": 123,
"reserved_usd": "<string>"
},
"labels_to_check": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}