curl -X POST http://localhost:8000/model/accuracy \
-H "Content-Type: application/json" \
-d '{"accuracy": 0.92}'
import requests
response = requests.post(
"http://localhost:8000/model/accuracy",
json={"accuracy": 0.92}
)
print(response.json())
{
"status": "ok",
"accuracy": 0.92,
"model_id": "production"
}
Update Accuracy
Push a new accuracy metric to Prometheus for Grafana dashboard visualization
POST
/
model
/
accuracy
curl -X POST http://localhost:8000/model/accuracy \
-H "Content-Type: application/json" \
-d '{"accuracy": 0.92}'
import requests
response = requests.post(
"http://localhost:8000/model/accuracy",
json={"accuracy": 0.92}
)
print(response.json())
{
"status": "ok",
"accuracy": 0.92,
"model_id": "production"
}
Push a new accuracy metric (0.0–1.0) to the system’s Prometheus gauge. This endpoint is typically called by the Automated Evaluation Pipeline after a retraining job completes.
Parameters
float
required
New accuracy score (0.0 to 1.0) to be reported to Prometheus.
string
Identifier for the model being evaluated. Defaults to
"production".Usage
This does not retrain the model. It updates the metrics gauge (model_accuracy), which triggers alerts if accuracy drops below configured thresholds.
curl -X POST http://localhost:8000/model/accuracy \
-H "Content-Type: application/json" \
-d '{"accuracy": 0.92}'
import requests
response = requests.post(
"http://localhost:8000/model/accuracy",
json={"accuracy": 0.92}
)
print(response.json())
{
"status": "ok",
"accuracy": 0.92,
"model_id": "production"
}
Was this page helpful?
