curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"datasetName": "Example Dataset",
"numberOfBuckets": 10
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/datasets"
payload = {
"datasetName": "Example Dataset",
"numberOfBuckets": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"datasetKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"datasetCreationProgressUrl": "<string>",
"numberOfBuckets": 123,
"datasetUploadInfo": {
"uploadUrl": "<string>",
"extraHeaders": "<string>"
},
"uploadTargets": [
{
"kind": "TRAIN",
"url": "<string>",
"requiredHeader": "<string>"
}
]
}Create a dataset
Create a dataset. A dataset is the labelled data a training run reads: an 80% train CSV and a 20% test CSV that keeps its labels.
Two ways to fill it:
- Upload. The response carries one
uploadTargetsentry per file (TRAINandTEST). PUT each CSV to its signed URL, then callPOST /api/v1/datasets/{datasetKey}/clean. - From a refinement. Send
featureRefinementKeyinstead. The refined train and test files and the target that refinement reached come across with it,uploadTargetscomes back empty, and there is nothing to upload.
The dataset starts PENDING, moves to PROCESSING when cleaning starts, and is ready to train from
at COMPLETED. Poll GET /api/v1/datasets/{datasetKey} for the status.
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/datasets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"datasetName": "Example Dataset",
"numberOfBuckets": 10
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/datasets"
payload = {
"datasetName": "Example Dataset",
"numberOfBuckets": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"datasetKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"datasetCreationProgressUrl": "<string>",
"numberOfBuckets": 123,
"datasetUploadInfo": {
"uploadUrl": "<string>",
"extraHeaders": "<string>"
},
"uploadTargets": [
{
"kind": "TRAIN",
"url": "<string>",
"requiredHeader": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The unique dataset name
3 - 30"German Credit refined"
The dataset description in plain text
3 - 150"Refined German Credit data, 4 buckets"
4 <= x <= 1000Build this dataset from a completed refinement instead of from uploaded files. Its refined train and test files and the threshold it trained to come across with it, so no upload target is returned. Its bucket count comes across as the default: the cleaning here starts from scratch, so a caller that sends its own bucket count above is honoured.
Response
Dataset successfully created
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Status of dataset creation:
PENDING- The dataset has been created and is pending further actions. Mainly data additionPROCESSING- The dataset is currently being processed. When this status is returned an url to check status is returned tooCOMPLETED- The dataset has been processed and is completed. The dataset is now ready to be used for training modelsFAILED- The dataset processing has failed
PENDING, PROCESSING, COMPLETED, FAILED Where to PUT the CSV on the single-file route. Prefer uploadTargets, which names each file it
expects.
uploadUrl is a signed URL valid for 60 minutes. PUT the CSV as a binary body with
Content-Type: text/csv and every header listed in extraHeaders (one colon-joined
Name:value pair per header, semicolon-separated). Send no Authorization header: the signature
covers the request, and an extra header breaks it.
Show child attributes
Show child attributes
Where to PUT each input file. A dataset built from a train and a labelled test file returns one target per file; a dataset whose files came from a completed refinement returns none, because nothing is uploaded. Empty on the single-file pipeline.
Show child attributes
Show child attributes