feat(sink): add HarnessSink for Harness AI Evals#4
Open
sunilgattupalle wants to merge 1 commit into
Open
Conversation
Reads harness_run_id and harness_dataset_item_id from eval_case.metadata, posts items immediately in write(), and marks the run complete in finalize(). Follows the same credentials-only constructor pattern as LangfuseSink. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> AI-Session-Id: ccc01b30-2601-497f-9554-dece2a213c53 AI-Tool: claude-code AI-Model: unknown
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HarnessSink— pushes evaluation scores directly into a Harness AI Evals runLangfuseSink; required context (harness_run_id,harness_dataset_item_id) comes fromeval_case.metadataexamples/harness_sink_example.pyshowing end-to-end usageDesign
The sink takes only credentials in the constructor (from params or env vars). Two metadata keys are required on each
EvalCase:harness_run_id— the run to write into (created externally by the user)harness_dataset_item_id— the dataset item this case corresponds towrite()POSTs each item immediately.finalize()PATCHes all seen runs tocompleted.Test Plan
HARNESS_ACCOUNT_ID,HARNESS_API_KEY,HARNESS_PROJECT_IDenv varspython examples/harness_sink_example.pywith real IDs