Repository navigation
test: cover Study orchestration (make_study dispatch, cross-product, relaunch loop) - #48
Open
giladsamuels-cognition wants to merge 1 commit into
Open
giladsamuels-cognition wants to merge 1 commit into
giladsamuels-cognition wants to merge 1 commit into
Conversation
…relaunch loop) Co-Authored-By: Gilad Samuels <gilad.samuels@cognition.ai>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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
Before this PR,
tests/experiments/test_study.pyonly had skipped tests, somake_studydispatch,Study.make_exp_args_listand theStudy.runrelaunch loop had no real coverage. This PR adds tests for them that don't need a MiniWoB server or a real LLM. They useCheatMiniWoBLLMArgsonminiwob_tiny_test(4 envs). No production code changes.make_studydispatch: one agent returns aStudy. Several agents on miniwob return a singleStudy. Several agents on awebarena*-named benchmark (adataclasses.replacecopy of the tiny benchmark) return aSequentialStudieswith one sub-study per agent.parallel_servers=2returns aParallelStudies.ExpArgsin agent-major order, withorder0..7 and logging levels passed through. Re-runningmake_exp_args_listafter changing agents rebuilds the list. More than one agent on a webarena benchmark raisesValueError.Study.find_incomplete: checks the(n_incomplete, n_error)counts against the existingtests/data/test_studyfixture.Study.runloop:set_reproducibility_info,_run,get_resultsandfind_incompleteare patched at class level so the study still pickles through the realsave(exp_root=tmp_path). The tests check that:n_relaunchcaps the number of trials;relaunch_errorsis passed tofind_incompleteasinclude_errors, andstrict_reproducibilityreaches bothset_reproducibility_infoand_run.Agent flags are deep-copied because
set_benchmarkchanges them in place. This keeps the sharedFLAGS_GPT_4ofrom being modified.Note for reviewers (not changed here): in
Study.run,last_error_countis never reassigned after it is set toNone. So the "Last trial did not reduce the number of errors" check never fires. The tests don't depend on that branch.pytest tests/experiments/test_study.py→ 14 passed, 1 skipped.Link to Devin session: https://app.devin.ai/sessions/3583e45b1ae5405ebd59c438e57d417b
Open in Devin Desktop: https://app.devin.ai/desktop/session/3583e45b1ae5405ebd59c438e57d417b?variant=devin
Requested by: @giladsamuels-cognition
Devin Review