fix(harness): align the portal web UI with the revamped harness run contract - #2408
Draft
jdye64 wants to merge 4 commits into
Draft
fix(harness): align the portal web UI with the revamped harness run contract#2408jdye64 wants to merge 4 commits into
jdye64 wants to merge 4 commits into
Conversation
Align the portal trigger backend with the revamped harness run interface
(retriever harness run --mode {local,batch,service}). The portal only ever
emitted run_mode=service; local/batch could not be selected. Validate the
requested mode against contracts.MODE_TO_RUN_MODE and always record it on the
job so a runner can translate it into a valid --mode. Add /api/harness-info to
expose the current run contract (modes + benchmark/runset registry) so the UI
stays in sync with the harness.
Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
_resolve_dataset_config now returns a 3-tuple (path, overrides, dataset_meta), but the MCP trigger tool still unpacked two values and crashed at call time. Unpack the dataset_meta, forward dataset_id/config_hash onto the job, and add an optional execution mode argument validated against the harness contract. Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
Add a Local/Batch/Service execution-mode selector that maps to the harness --mode flag, populated from /api/harness-info. Batch mode was previously unreachable from the UI even though the harness requires it for large BEIR corpora. Service pipeline is now an execution mode rather than a pipeline type; graph pipelines are disabled in service mode. Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
Update the dataset form input types to the harness-supported set (auto/pdf/doc/txt/html/image/audio/video); the old 'text' value was invalid and doc/html/video/auto were missing. Add the pdf_page_modality BEIR doc-id field and default new datasets to pdf_page to match the current DatasetSpec. Replace references to the removed 'retriever harness runner start' and 'retriever harness backfill' commands with current guidance. Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
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.
Description
The Retriever harness was revamped (#2270 and follow-ups) into a benchmark-registry CLI: runs are launched with
retriever harness run <benchmark> --mode {local,batch,service}and dotted--setoverrides, and the legacysweep/nightly/portal/runner/backfillCLI commands were removed. The harness portal web UI was never updated to match, so several "run things" paths are stale or broken. This PR realigns the portal's run-triggering surface with the current harness contract.Harness ↔ portal differences that were breaking things
local/batch/service(contracts.MODE_TO_RUN_MODE, wherelocal → ingest.run_mode=inprocess). The portal only ever emittedrun_mode=serviceand had no way to picklocalorbatch— even though the harness README requiresbatchfor the large BEIR corpora (BO767, FinanceBench, Earnings, ViDoRe)._resolve_dataset_configsignature drift. It now returns a 3-tuple(path, overrides, dataset_meta), but the MCPtrigger_benchmark_runtool still unpacked two values, so triggering a run over MCP crashed at call time.retriever harness runner start …andretriever harness backfill, which no longer exist.input_type=text(not a valid harness input type) and was missingdoc/html/video/auto; the harness now supportsauto/pdf/doc/txt/html/image/audio/video. It also lacked thepdf_page_modalityBEIR doc-id field and defaulted new datasets topdf_basenameinstead of the currentDatasetSpecdefaultpdf_page.Changes
portal/app.pyMODE_TO_RUN_MODEin/api/runs/triggerand always record it on the job (canonicalmode, withrun_modekept as a legacy alias)./api/harness-infoexposing the current run contract — accepted modes and the code-owned benchmark/runset registry — using the lightweightbenchmark_registryimport so the UI has a single source of truth.portal/mcp_tools.py— fix the 3-tuple unpack crash intrigger_benchmark_run, forwarddataset_id/dataset_config_hash, and add an optional validatedmodeargument.portal/static/views/trigger.jsx— add a Local/Batch/Service execution-mode selector (populated from/api/harness-info); service is now an execution mode rather than a pipeline type, and graph pipelines are disabled in service mode.portal/static/views/datasets.jsx— correct the input-type list, addpdf_page_modality, default new datasets topdf_page.portal/static/views/runs.jsx,runners.jsx— replace references to removed CLI commands with current guidance.Known follow-up (out of scope, needs the runner)
The portal still stores managed-dataset/preset config as flat keys (
dataset_dir,embed_model_name,ocr_version,beir_loader, …). The current harness only accepts dotted--setnamespaces (dataset.*,ingest.*,query.*,evaluation.*) and rejects unknown keys with exit code 2. The flat→dotted translation lives in the runner agent (external to this repo), which must be updated alongside these UI changes for end-to-end runs to succeed.Checklist