Repository navigation
eval: run any provider as a LangSmith experiment scored by score_one - #259
Merged
Merged
Conversation
Why: the LangSmith path could sync a dataset and export a finished experiment, but nothing created an experiment, the dataset name did not say which pack it held, every sync rewrote all 61 examples, and the export rejected the names langsmith.evaluate gives (and the unaided track). What: eval/langsmith_experiment.py wraps an eval/run.py provider as an evaluate() target; row evaluators call langsmith_bridge.evaluator_feedback and a summary evaluator calls report_from_answers, so both are mission_scoring.score_one. Metadata carries calculator_version, provider, track, commit_sha, dataset and fixtures; --expect fails unless the six scores equal a committed result. The dataset is now suas-advisory-eval-<calculator version>-<12 hex of the pack sha256>, a repeat sync writes nothing, and the duplicated client builder is one client_from_env (SUAS_LANGSMITH_API_KEY only, SDK imported lazily). Proof: tests/test_langsmith_experiment.py (red first: module missing) drives a no-network evaluate stand-in and matches eval/results/2026-11-29 for oracle, constant_power, always_no_go and echo; a subprocess probe imports every eval LangSmith module with langsmith blocked. An offline run of the real langsmith 0.14.12 evaluate (upload_results=False) gave zero mismatches for oracle/calculator_tool and constant_power/no_tools. Full backend suite 1285 passed; ruff, format, mypy clean; CRAP of every new or changed function below 10.
Why: the new experiment runner needs setup steps a reader can follow with environment variables only, and ops.md still named a single fixed dataset. What: eval/LANGSMITH.md (setup, dataset naming, commands, scores, metadata, tracing, free-tier note), a README details block, the ops.md eval-record section, and this week's changelog line. Proof: test_readme (links resolve), test_changelog, and the US English lint pass in the full backend suite.
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.
Runs any eval provider and track as a LangSmith experiment. The scores come from the repository's own scorer (
mission_scoring.score_one), so nothing is scored a second way. The run is manual: CI makes no LangSmith call.What changed
eval/langsmith_experiment.py(new). This is the CLI and adapter. It wraps aneval/run.pyprovider as thelangsmith.evaluatetarget, and the target looks each fixture up byfixture_idin the committed pack.langsmith_bridge.evaluator_feedback(the four failure flags).report_from_answers(the four totals plusmax_abs_hover_error_wandmax_abs_energy_error_wh).calculator_version,provider,track,commit_sha,dataset,fixtures.--expect FILEfails unless all six numbers equal a committed result.suas-advisory-eval-<calculator version>-<12 hex of the pack sha256>, so a regenerated pack gets a new dataset.client_from_envreplaces two copies. It reads onlySUAS_LANGSMITH_API_KEYandSUAS_LANGSMITH_ENDPOINT, and the SDK is imported lazily, so every eval module imports withoutlangsmith.evaluategives ({provider}.{track}-<suffix>) and theunaidedtrack.eval/LANGSMITH.md, a README<details>block, the eval-record section ofdocs/ops.md, and a changelog line.What stays the same
SUAS_LANGSMITH_TRACING=truewith redaction. Startup still refuses LangChain's unredactedLANGSMITH_TRACING=true.langsmith==0.14.12was already pinned. No new dependency, no CI job, and no workflow change.How it was proven (ub-mode log)
backend/tests/test_langsmith_experiment.pyfirst. It failed at collection because the module did not exist yet.evaluatemakes the SDK's calls. With it, oracle/calculator_tool, constant_power/no_tools, always_no_go/unaided, and echo/unaided equaleval/results/2026-11-29on all six columns.langsmithblocked.langsmith0.14.12evaluateran offline (upload_results=False, unreachable endpoint). There were zero mismatches for oracle/calculator_tool and constant_power/no_tools.mypy --strictare clean. crapper on the changed eval modules puts every new or changed function below CRAP 10. The US English lint passes.