Skip to main content

upload_record

Function upload_record 

Source
pub fn upload_record(
    upload: &Upload,
    record: &RunRecord,
) -> Result<UploadResponse>
Expand description

POST record to the EvalForge ingest endpoint for upload, returning the parsed UploadResponse.

Uses a blocking ureq agent with a ~30s timeout so a hung network can’t block the run return. The body is the JSON-serialized RunRecord (its serde shape IS the API DTO); auth is Authorization: Bearer {api_key}. A non-2xx status, a transport error, or an unparseable body all map to a descriptive anyhow::Error — the caller “warns, doesn’t fail”, so an upload error never drops the eval signal.