Choose which model predictions run against
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/training/{trainingJobKey}/champion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attemptNumber": 7,
"observations": "Higher recall matters more than total error here"
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/training/{trainingJobKey}/champion"
payload = {
"attemptNumber": 7,
"observations": "Higher recall matters more than total error here"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"attemptNumber": 123,
"version": "<string>",
"selectedBy": "AUTOMATIC",
"observations": "<string>"
}Training
Choose which model predictions run against
Points this run’s predictions at a different one of the models it offers.
- Only an attempt the run actually offers can be chosen. Anything else returns
400. - Nothing is rebuilt. A flag moves, so this is cheap and repeatable.
- Changing it never rewrites history. Every prediction records the version it ran against.
To predict with a different model, change it here and run the prediction again.
POST
/
api
/
v1
/
training
/
{trainingJobKey}
/
champion
Choose which model predictions run against
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/training/{trainingJobKey}/champion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attemptNumber": 7,
"observations": "Higher recall matters more than total error here"
}
'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/training/{trainingJobKey}/champion"
payload = {
"attemptNumber": 7,
"observations": "Higher recall matters more than total error here"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"attemptNumber": 123,
"version": "<string>",
"selectedBy": "AUTOMATIC",
"observations": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Which of the run's models to predict with from now on.