Preserve unknown AI credits in bceval exports - #864
Conversation
Keep unavailable token and AI-credit metadata null in bceval exports, export observed total tokens, and retain per-entry engine metrics separately from scoring inputs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 54e9590b-a81d-49c6-8574-b88c9670152d
Limit nullable export changes to AI credits because bc-eval 0.3.14 adds prompt and completion tokens before custom callbacks. Align mock CI artifact names with the summary download filter and document the remaining token limitation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 54e9590b-a81d-49c6-8574-b88c9670152d
There was a problem hiding this comment.
Do we know why this happens?
missing upstream usage
Missing or schema-invalid metrics already appear to fail, maybe additional corn cases we should address instead?
Not sure if we want to keep "_run-metrics.json", it should have been an intermediate step, and abstracted away from the overall orchestration
Remove orchestration retention of the engine's intermediate metrics and its related workflow changes. Add loader-to-export regressions for valid producer payloads without chat spans or billing attributes, while preserving existing missing-file and invalid-schema failures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 54e9590b-a81d-49c6-8574-b88c9670152d
|
Thanks, agreed on keeping the intermediate artifact out of orchestration. I removed its retention and all related workflow/filter/mock-naming changes in 62c2834; those files now match the PR base. There are two distinct cases:
We still do not know why the old live run lacked usage: its raw telemetry is no longer available. This is an export-correctness fix, not a collection-root-cause claim. The final production change is only preserving null AI credits. Token export remains unchanged because bc-eval 0.3.14 cannot add null token counts; its actual consumer accepts nullable credit metadata. No engine behavior or failure checks were relaxed. New live evidence (separate from the old run): The completed paired gate run 34221000483 retained valid schema-v1 aggregates from CLI 1.0.82: baseline 34221111997 and candidate 34222250479 both have |
Sun Haoran (haoranpb)
left a comment
There was a problem hiding this comment.
Thanks for the update.
Going forward, I think the ai_credits will probably be a very important metric, we could fail the jobs when is it None, but that is out of scope of this PR
Fix
Preserve
ai_credits: nullwhen exporting a result to bceval instead of turning unknown usage into a measured zero. Observed zero and nonzero credits are unchanged. The only production-code change is removal of this export fallback.Valid nullable usage is distinct from missing or invalid metrics
A missing engine metrics file or a schema-invalid payload already raises
AgentError; those failures remain unchanged. Separately, the evaluated engine'sGet-CopilotRunMetrics/Save-CopilotRunMetricscan produce a valid schema-v1 payload with unavailable numeric usage:usage_complete=false,malformed_records=0, nullable usage fields.ai_credits=null.Both payloads are accepted by the existing strict BC-Bench loader. New regression cases follow that loader through the result and bceval export; they do not merely inject None into the exporter. The exact engine producer functions at
159572aad814d6e1022ca8d54e85a6eab7c4d5c6were executed offline and their outputs matched the regression payloads.This establishes the supported nullable path, not the collection root cause of run 34203457236. Its old raw telemetry is unavailable, so why that run lacked usage remains unknown. No engine correction is claimed.
Scope after review
Removed the proposed
_run-metrics.jsonartifact retention and all associated workflow download filtering/mock-artifact naming changes. All workflow files and workflow tests match the PR merge base; intermediate engine telemetry remains abstracted from CI orchestration. No pin, model, package/lockfile, result schema, publication, requeue, or scoring changes.bc-eval 0.3.14 directly adds prompt/completion tokens before the custom callback and cannot accept null there. Existing numeric token export behavior is intentionally unchanged; there is no new total-token export. Nullable AI credits are accepted as metadata. Gate token accounting must use original per-entry result metrics rather than bceval token fallbacks.
Validation
62c283424eb3cf1514fcbd8e9347df7fdcfbc721, includingsummarize-results / Resultsand its bceval step. No evaluation/model dispatch, rerun, or merge was requested.