Repository navigation
fix(webui): show real training runs in the Results tab - #493
Open
ni (nniiovoo) wants to merge 1 commit into
Open
ni (nniiovoo) wants to merge 1 commit into
ni (nniiovoo) wants to merge 1 commit into
Conversation
The Results tab expected outputs/<benchmark>/<run>/config.yaml with a "score" key, which nothing writes, so a finished run showed up as its skills/ and steps/ folders with no score. Read the config.json, history.json and summary.json the trainer writes instead. Fixes microsoft#492 Signed-off-by: NNIIOVO <haimingni44@gmail.com>
This branch has not been deployed
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.
Fixes #492
The Results tab expected
outputs/<benchmark>/<run>/config.yamlwith ascorekey, which nothing writes. For a real run it listed the run'sskills/andsteps/folders as experiments, with no score or steps.scan_outputsnow treats a folder withconfig.json,history.jsonorsummary.jsonas a run, and reads what the trainer writes:config.json→env.summary.json→best_selection_hard. For a run still in progress, the highestbest_scoreinhistory.json.summary.json→total_steps, else the number of history entries.Details:
summary.jsonuntil it finishes, so a summary with fewer steps than the history is ignored.<group>/<run>._ensure_under_project.With a
softormixedgate, a run in progress shows the gate score and a finished one shows hard accuracy. With the defaulthardgate they are the same metric.The two "allows a valid subfolder" tests in
tests/test_webui_security.pynow buildconfig.jsoninstead ofconfig.yaml. The path-traversal checks are unchanged.Tests: new
tests/test_webui_results_tab.py. All 7 fail on main. One of them uses a run folder written by the real trainer with a mock env.Full suite on macOS: 2638 passed. The 2 failures in
tests/test_sleep_adopt_skill_subset.pyalso fail on main.