Start a training run on a dataset
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/training/datasets/{datasetKey} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scalingFactor": 19,
"performanceThreshold": 0.85
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/training/datasets/{datasetKey}"
payload = {
"scalingFactor": 19,
"performanceThreshold": 0.85
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)"{\n \"trainingJobKey\": \"41eac90e-de55-4d60-8b10-8a57ee27db2e\",\n \"datasetKey\": \"7215eec1-f233-419e-bad2-8fda560dff75\",\n \"status\": \"PENDING\"\n }\n"Training
Start a training run on a dataset
Start a Crucible run against a dataset. The dataset must be COMPLETED.
The run trains many attempts at once across three algorithm families, scores each on the 20% test
data, ranks them by fewest wrong decisions, and keeps the best three as v1, v2 and v3 of one model.
v1 becomes the champion; POST /api/v1/training/{trainingJobKey}/champion moves it.
Two settings:
performanceThreshold— the accuracy each attempt aims for, between 0 and 1. Set this to the dataset’srecommendedThresholdwhen it has one. A dataset that came from a refinement carries the target that refinement actually reached; a target far above it makes every attempt run to its time cap, and the run can settle on a model that predicts one class for every row. Where there is norecommendedThreshold, start near what the data plausibly supports rather than at 0.9.scalingFactor— an integer, 0 to 499. 19 is the working default and rarely needs changing.
Returns immediately. Poll GET /api/v1/training/{trainingJobKey}/progress until the status is
terminal, honouring nextPollAfterSeconds.
POST
/
api
/
v1
/
training
/
datasets
/
{datasetKey}
Start a training run on a dataset
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/training/datasets/{datasetKey} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scalingFactor": 19,
"performanceThreshold": 0.85
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/training/datasets/{datasetKey}"
payload = {
"scalingFactor": 19,
"performanceThreshold": 0.85
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)"{\n \"trainingJobKey\": \"41eac90e-de55-4d60-8b10-8a57ee27db2e\",\n \"datasetKey\": \"7215eec1-f233-419e-bad2-8fda560dff75\",\n \"status\": \"PENDING\"\n }\n"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Training job successfully created
Status of training:
PENDING- The training job has been created and is pending executionRUNNING- The training job is currently executing and progressingCOMPLETED- The training job has completed execution successfully, reaching the target performance. A model has been generated.TIMED_OUT- The training job could not reach the target performance in the configuredCANCELLED- The training job has been cancelled by the userNOT_COMPLETED- The training job has stalled without making progress in a specified timeframeFAILED- The training job has failed due to an error
Available options:
PENDING, RUNNING, COMPLETED, TIMED_OUT, CANCELLED, FAILED, NOT_COMPLETED