Get training progress
curl --request GET \
--url https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "COMPLETED",
"jobs": [
{
"trainingJobKey": "bc9aa412-8d4f-4b00-89af-0e6e3dcf8e57",
"algorithm": "BSEV01",
"status": "NOT_COMPLETED",
"latestPerformance": 0.6199,
"recentPerformances": [
0.6199,
0.6199,
0.6199,
0.6199,
0.6199
]
},
{
"trainingJobKey": "d9ab4260-6416-45d6-91e4-7b0b8a0ad56b",
"algorithm": "BFIF01",
"status": "NOT_COMPLETED",
"latestPerformance": 0.7714,
"recentPerformances": [
0.7713,
0.7713,
0.7714,
0.7714
]
},
{
"trainingJobKey": "e7edd490-3ee2-49f8-a49c-e9f9759965e8",
"algorithm": "BSIX01",
"status": "NOT_COMPLETED",
"latestPerformance": 0.8595,
"recentPerformances": [
0.8579,
0.8602,
0.866,
0.8595
]
},
{
"trainingJobKey": "f2275fde-73ed-43d0-948a-17ff8f586874",
"algorithm": "BSEV02",
"status": "COMPLETED",
"latestPerformance": 0.92,
"recentPerformances": [
0.9194,
0.92,
0.92,
0.9197,
0.92
]
}
]
}Training
Get training progress
Returns the real-time progress of all competing algorithms in a training job.
Each algorithm reports its latestPerformance and recentPerformances (last N iterations).
When one algorithm reaches performanceThreshold, the overall status becomes COMPLETED
and a model is generated.
Terminal statuses: COMPLETED, TIMED_OUT, CANCELLED, NOT_COMPLETED, FAILED
GET
/
api
/
v1
/
training
/
{trainingJobKey}
/
progress
Get training progress
curl --request GET \
--url https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mathfi.ai/api/v1/training/{trainingJobKey}/progress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "COMPLETED",
"jobs": [
{
"trainingJobKey": "bc9aa412-8d4f-4b00-89af-0e6e3dcf8e57",
"algorithm": "BSEV01",
"status": "NOT_COMPLETED",
"latestPerformance": 0.6199,
"recentPerformances": [
0.6199,
0.6199,
0.6199,
0.6199,
0.6199
]
},
{
"trainingJobKey": "d9ab4260-6416-45d6-91e4-7b0b8a0ad56b",
"algorithm": "BFIF01",
"status": "NOT_COMPLETED",
"latestPerformance": 0.7714,
"recentPerformances": [
0.7713,
0.7713,
0.7714,
0.7714
]
},
{
"trainingJobKey": "e7edd490-3ee2-49f8-a49c-e9f9759965e8",
"algorithm": "BSIX01",
"status": "NOT_COMPLETED",
"latestPerformance": 0.8595,
"recentPerformances": [
0.8579,
0.8602,
0.866,
0.8595
]
},
{
"trainingJobKey": "f2275fde-73ed-43d0-948a-17ff8f586874",
"algorithm": "BSEV02",
"status": "COMPLETED",
"latestPerformance": 0.92,
"recentPerformances": [
0.9194,
0.92,
0.92,
0.9197,
0.92
]
}
]
}Authorizations
Obtain a token from POST /api/login. Valid for 1 hour.
Path Parameters
Response
Training progress retrieved successfully
Status of a training job:
| Status | Description |
|---|---|
PENDING | Queued, not yet started |
RUNNING | Algorithms competing in parallel |
COMPLETED | Target performance reached. Champion model created. |
TIMED_OUT | Did not reach target performance within the time limit |
NOT_COMPLETED | Stalled — no progress detected for a sustained period |
CANCELLED | Cancelled by the user |
FAILED | Failed due to an internal error |
Available options:
PENDING, RUNNING, COMPLETED, TIMED_OUT, NOT_COMPLETED, CANCELLED, FAILED Show child attributes
Show child attributes
⌘I