Add exploration config generator, drop broken clean_trajectories.py#5
Open
xhluca wants to merge 1 commit into
Open
Conversation
Two gaps reported in follow-up to #4: 1. The released code had no script to (re)build the `exploration.tasks.json` config that `a3-explore` consumes — only pre-generated configs for `gemini-3-pro-preview`. This adds `scripts/generate_exploration_tasks.py`, ported from the internal repo, which reads personas from `outputs/personas/<exploration_model>/` and writes one task per (persona, site) pair to `agent_as_annotators/configs/<exploration_model>/exploration.tasks.json` (the location `a3-explore` discovers via importlib.resources). 2. `scripts/clean_trajectories.py` was an unfinished work-in-progress that got accidentally checked in: depends on `agent_reward_bench` (not in the project deps), references undefined `judge`/`provider`, contains a stray `breakpoint()`, and is not part of the documented pipeline. The "cleaning" step in the README is actually performed by `scripts/convert_trajectories_to_json.py`, which writes JSONs to `trajectories/cleaned/`. Removed. README updated to add `generate_exploration_tasks.py` as sub-step 2a and renumber the existing sub-steps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
What
Two gaps reported in follow-up to #4:
Missing exploration-config generator. The released code shipped pre-generated
exploration.tasks.jsononly forgemini-3-pro-previewand had no script to (re)build it for a different exploration model or persona set. This addsscripts/generate_exploration_tasks.py, ported from the internal repo, which reads personas fromoutputs/personas/<exploration_model>/personas.json(produced byscripts/create_personas.py) and writes one task per (persona, site) pair toagent_as_annotators/configs/<exploration_model>/exploration.tasks.json— the locationa3-explorediscovers automatically viaimportlib.resources.Broken
clean_trajectories.py. This file was an unfinished work-in-progress that got accidentally checked in: it importsagent_reward_bench(not in the project's dependencies), references undefined names (judge,provider) at module body, contains a straybreakpoint()at line 103, and is not referenced anywhere in the documented pipeline. The "cleaning" step described in the README is actually performed byscripts/convert_trajectories_to_json.py, which writes its output totrajectories/cleaned/. Removed.Changes
scripts/generate_exploration_tasks.py— defaults output path to the package'sagent_as_annotators/configs/directory soa3-explorepicks up the file with no further configuration. Imports useagent_as_annotators.{prompts,utils}(not the internalllm_annotatorspackage). Behaviour is otherwise identical to the internal version.scripts/clean_trajectories.py2a(config generation) →2b(a3-explore) →2c(extract chat messages) →2d(prepare prompts) →2e(generate task intents).Base
Stacked on top of #4 (which adds
extract_chat_messages.pyandprepare_tasks_intents_prompts.py). Once #4 merges, this PR will rebase cleanly ontomain.