Skip to main content

Module upload

Module upload 

Source
Expand description

Automatic upload of a finished eval run to the EvalForge API (evalforge.ai) so results show up in the online dashboard with no manual export/import.

This is the engine behind RunMeta::upload_to: when a run carries an Upload target, run_eval_with_meta POSTs the assembled RunRecord to https://evalforge.ai/api/projects/{project_id}/runs once the run finishes. The record’s serde shape IS the API’s ingest DTO, so the body is reused as-is — no separate wire type. The module is always compiled in; uploading happens only at runtime when a host configures an Upload target on the run metadata (nothing is sent otherwise).

The base URL is a hardcoded crate constant (EVALFORGE_BASE_URL); end users only ever configure a project id + API key. (A #[cfg(test)]-only override exists so unit tests can point at a local mock; it is NOT part of the public API.)

Structs§

Upload
Where and how to upload a run, attached to a RunMeta via RunMeta::upload_to. When present on the meta passed to a run, the runner POSTs the assembled RunRecord to the EvalForge API after the cases finish.
UploadResponse
The EvalForge ingest success body: { "runId": string, "deduped": bool }. deduped is true when the server replaced a prior run with the same (projectId, model, timestamp_file) (re-uploads are safe / idempotent).

Functions§

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