Skip to content

Commit cff7ff6

Browse files
CuzyoungCopilot
andcommitted
fix: rename remaining teacher/student refs, remove .gradio from repo
- Fix teacher/student in deep_reflect, meta_reflect, sealqa, babyvision, mathverse, mmrb, swebench envs and prompt templates - Remove .gradio/certificate.pem from tracked files - Add .gradio/ to .gitignore Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7ae2d87 commit cff7ff6

27 files changed

Lines changed: 148 additions & 178 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ docs/reflact_conda_env_export.yml
3939
docs/reflact_overview.html
4040
docs/render_ablation_paper_tables.py
4141
docs/让*
42+
.gradio/

‎.gradio/certificate.pem‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎skillopt/envs/alfworld/prompts/deep_probe.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
You are an expert diagnostic-probe designer for ALFWorld embodied tasks.
22

3-
You will design one short diagnostic instruction to append to the student's prompt
3+
You will design one short diagnostic instruction to append to the target's prompt
44
for a handful of representative ALFWorld trajectories.
55

6-
The goal is to expose whether the student has the right intermediate subgoal,
6+
The goal is to expose whether the target has the right intermediate subgoal,
77
object/receptacle state, and next-step intention without substantially changing
88
the current scaffold.
99

1010
## Hard Constraints
11-
1. Do NOT substantially change the student's existing action-selection scaffold.
11+
1. Do NOT substantially change the target's existing action-selection scaffold.
1212
2. Do NOT prescribe a brand-new planner or long multi-step policy.
1313
3. Do NOT ask for exhaustive search over all objects or all admissible actions.
1414
4. Keep the diagnostic readout brief and place it inside the existing <think>...</think> block.
15-
5. The student must still output exactly one admissible action inside <action>...</action>.
15+
5. The target must still output exactly one admissible action inside <action>...</action>.
1616
6. If hidden reference material is provided, use it only to target the right latent gap.
17-
7. Never copy hidden reference content into the student-facing probe.
17+
7. Never copy hidden reference content into the target-facing probe.
1818

1919
## Good Probe Targets
2020
- current subgoal
@@ -31,5 +31,5 @@ the current scaffold.
3131
Respond ONLY with a valid JSON object:
3232
{
3333
"reasoning": "<why this probe reveals the latent skill gap>",
34-
"probe_instruction": "<the exact instruction text to append to the student prompt>"
34+
"probe_instruction": "<the exact instruction text to append to the target prompt>"
3535
}

‎skillopt/envs/babyvision/adapter.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from skillopt.envs.base import EnvAdapter
1111
from skillopt.envs.babyvision.dataloader import BabyVisionDataLoader
1212
from skillopt.envs.babyvision.rollout import run_batch
13-
from skillopt.model import get_student_backend
13+
from skillopt.model import get_target_backend
1414

1515

1616
class BabyVisionAdapter(EnvAdapter):
@@ -165,7 +165,7 @@ def deep_reflect(
165165
random_seed = kwargs.get("random_seed")
166166
step_buffer_context = kwargs.get("step_buffer_context", "")
167167
meta_skill_context = kwargs.get("meta_skill_context", "")
168-
codex_backend = get_student_backend() == "codex_exec"
168+
codex_backend = get_target_backend() == "codex_exec"
169169
selected_items = self.select_representative_items(
170170
results,
171171
env_manager if isinstance(env_manager, list) else None,

‎skillopt/envs/babyvision/prompts/deep_probe.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
You are an expert diagnostic-probe designer for BabyVision-style visual reasoning tasks.
22

3-
You will be shown representative trajectories, the current student skill, and the student's original prompt context.
4-
Design one SMALL diagnostic instruction that exposes the student's intermediate visual judgment without materially changing the original scaffold.
3+
You will be shown representative trajectories, the current target skill, and the target's original prompt context.
4+
Design one SMALL diagnostic instruction that exposes the target's intermediate visual judgment without materially changing the original scaffold.
55

66
## Hard Constraints
77
1. Do NOT substantially change the original scaffold.
88
2. Do NOT prescribe a new step-by-step solving method.
99
3. You MAY ask for a short structured list of a few intermediate conclusions, candidate cues, or counted units, as long as it stays close to the original scaffold.
1010
4. Do NOT ask for exhaustive listing of all cells, all objects, or a full chain-of-thought.
11-
5. Ask only for a short readout that reveals the student's current latent state.
11+
5. Ask only for a short readout that reveals the target's current latent state.
1212
6. Keep it brief and structured, and require the final answer to remain in <answer>...</answer>.
1313

1414
## Good Probe Targets
@@ -21,5 +21,5 @@ Design one SMALL diagnostic instruction that exposes the student's intermediate
2121
Respond ONLY with a valid JSON object:
2222
{
2323
"reasoning": "<why this probe is informative>",
24-
"probe_instruction": "<the exact instruction text to append to the student prompt>"
24+
"probe_instruction": "<the exact instruction text to append to the target prompt>"
2525
}

‎skillopt/envs/babyvision/rollout.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from concurrent.futures import ThreadPoolExecutor, as_completed
99

1010
from skillopt.envs.babyvision.evaluator import evaluate_item, evaluation_mode, extract_boxed_answer
11-
from skillopt.model import chat_student_messages, get_student_backend, is_student_exec_backend
12-
from skillopt.model.codex_harness import prepare_workspace, render_skill_md, run_student_exec
11+
from skillopt.model import chat_target_messages, get_target_backend, is_target_exec_backend
12+
from skillopt.model.codex_harness import prepare_workspace, render_skill_md, run_target_exec
1313
from skillopt.prompts import load_prompt
1414

1515
def _build_system(skill_content: str) -> str:
@@ -137,11 +137,11 @@ def _run_codex_once(
137137
images=[item["image_path"]],
138138
)
139139
prompt = (
140-
"Use the `skillopt-student` skill available in this workspace.\n"
140+
"Use the `skillopt-target` skill available in this workspace.\n"
141141
"Read `task.md`, inspect the attached image, and answer the question.\n"
142142
"Return the final answer in \\boxed{...}."
143143
)
144-
final_message, raw = run_student_exec(
144+
final_message, raw = run_target_exec(
145145
work_dir=work_dir,
146146
prompt=prompt,
147147
model=model,
@@ -195,7 +195,7 @@ def process_one(
195195
pred_dir = os.path.join(out_root, "predictions", item_id)
196196
os.makedirs(pred_dir, exist_ok=True)
197197

198-
if is_student_exec_backend():
198+
if is_target_exec_backend():
199199
from skillopt.model import azure_openai as _llm
200200

201201
response = ""
@@ -209,7 +209,7 @@ def process_one(
209209
pred_dir=pred_dir,
210210
item=item,
211211
skill_content=skill_content,
212-
model=_llm.STUDENT_DEPLOYMENT,
212+
model=_llm.TARGET_DEPLOYMENT,
213213
timeout=120,
214214
image_detail=image_detail,
215215
diagnostic_mode=diagnostic_mode if turn == 0 else False,
@@ -224,9 +224,9 @@ def process_one(
224224
result["response"] = response
225225
result["agent_ok"] = True
226226
result["n_turns"] = len(conversation) - 1
227-
with open(os.path.join(pred_dir, "student_system_prompt.txt"), "w", encoding="utf-8") as f:
227+
with open(os.path.join(pred_dir, "target_system_prompt.txt"), "w", encoding="utf-8") as f:
228228
f.write(system_prompt)
229-
with open(os.path.join(pred_dir, "student_user_prompt.txt"), "w", encoding="utf-8") as f:
229+
with open(os.path.join(pred_dir, "target_user_prompt.txt"), "w", encoding="utf-8") as f:
230230
f.write(user_text)
231231

232232
eval_result = evaluate_item(
@@ -299,7 +299,7 @@ def process_one(
299299

300300
for turn in range(max_turns):
301301
if turn == 0:
302-
resp_text, _ = chat_student_messages(
302+
resp_text, _ = chat_target_messages(
303303
messages=messages,
304304
max_completion_tokens=768,
305305
retries=5,
@@ -317,7 +317,7 @@ def process_one(
317317
{"role": "assistant", "content": response},
318318
{"role": "user", "content": refinement_text},
319319
]
320-
resp_text, _ = chat_student_messages(
320+
resp_text, _ = chat_target_messages(
321321
messages=refinement_messages,
322322
max_completion_tokens=512,
323323
retries=5,
@@ -332,9 +332,9 @@ def process_one(
332332
result["agent_ok"] = True
333333
result["n_turns"] = len(conversation) - 1
334334

335-
with open(os.path.join(pred_dir, "student_system_prompt.txt"), "w", encoding="utf-8") as f:
335+
with open(os.path.join(pred_dir, "target_system_prompt.txt"), "w", encoding="utf-8") as f:
336336
f.write(system_prompt)
337-
with open(os.path.join(pred_dir, "student_user_prompt.txt"), "w", encoding="utf-8") as f:
337+
with open(os.path.join(pred_dir, "target_user_prompt.txt"), "w", encoding="utf-8") as f:
338338
f.write(user_text)
339339

340340
eval_result = evaluate_item(

‎skillopt/envs/deep_reflect.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def run_no_reference_deep_reflect(
2121
output_requirements: list[str] | None = None,
2222
metadata_builder: Callable[[dict], dict] | None = None,
2323
) -> list[dict | None]:
24-
"""Run teacher-designed diagnostic probing without hidden references."""
24+
"""Run optimizer-designed diagnostic probing without hidden references."""
2525
if not getattr(adapter, "use_deep_reflect", False):
2626
return []
2727
if not isinstance(env_manager, list):
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
You are an expert diagnostic-probe designer for theorem-grounded mathematical multiple-choice tasks.
22

3-
You will be shown representative trajectories, the current student skill, and the student's original prompt context.
4-
Design one SMALL diagnostic instruction that exposes the student's intermediate judgment without materially changing the original scaffold.
3+
You will be shown representative trajectories, the current target skill, and the target's original prompt context.
4+
Design one SMALL diagnostic instruction that exposes the target's intermediate judgment without materially changing the original scaffold.
55

66
## Hard Constraints
77
1. Do NOT substantially change the original scaffold.
88
2. Do NOT prescribe a new multi-step theorem-solving procedure.
99
3. Do NOT ask for a full proof, full chain-of-thought, or exhaustive option-by-option derivation.
10-
4. Ask only for a short readout of the signals already behind the student's current answer.
10+
4. Ask only for a short readout of the signals already behind the target's current answer.
1111
5. Keep it brief and structured, and require the final answer to remain in <answer>...</answer>.
1212

1313
## Good Probe Targets
@@ -19,5 +19,5 @@ Design one SMALL diagnostic instruction that exposes the student's intermediate
1919
Respond ONLY with a valid JSON object:
2020
{
2121
"reasoning": "<why this probe is informative>",
22-
"probe_instruction": "<the exact instruction text to append to the student prompt>"
22+
"probe_instruction": "<the exact instruction text to append to the target prompt>"
2323
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
You are an expert diagnostic-probe designer for theorem-grounded mathematical multiple-choice tasks executed through a Codex trace.
22

3-
You will be shown representative trajectories, the current student skill, the student's original prompt context, hidden reference fields, and numbered Codex trace steps.
4-
Choose exactly one trajectory and one probe point. The probe point determines how much of the prior Codex trace will be shown back to the student before asking a short diagnostic question.
3+
You will be shown representative trajectories, the current target skill, the target's original prompt context, hidden reference fields, and numbered Codex trace steps.
4+
Choose exactly one trajectory and one probe point. The probe point determines how much of the prior Codex trace will be shown back to the target before asking a short diagnostic question.
55

66
## Hard Constraints
7-
1. Do NOT reveal or paraphrase the hidden reference directly to the student.
7+
1. Do NOT reveal or paraphrase the hidden reference directly to the target.
88
2. Do NOT prescribe a new full solving procedure.
99
3. Do NOT ask for a full proof, full chain-of-thought, or exhaustive option-by-option derivation.
10-
4. Ask only for a short readout of the signal that should already exist at that point in the student's process.
10+
4. Ask only for a short readout of the signal that should already exist at that point in the target's process.
1111
5. The probe instruction must explicitly request a short <analysis>...</analysis> block before the final <answer>...</answer>.
1212
6. Select a probe point that is informative about theorem choice, decisive constraint, option elimination, or why a stronger/weaker option should be rejected.
1313

1414
## Probe Point Semantics
1515
- `probe_target_id` must be one of the shown trajectory ids.
16-
- `probe_after_step` is the last numbered Codex trace step that should remain in the student's context.
17-
- The student will be re-run with the raw trace up to and including `probe_after_step`, then asked your `probe_instruction`.
16+
- `probe_after_step` is the last numbered Codex trace step that should remain in the target's context.
17+
- The target will be re-run with the raw trace up to and including `probe_after_step`, then asked your `probe_instruction`.
1818
- To probe before a tool call, choose the step immediately before that tool call.
1919

2020
Respond ONLY with a valid JSON object:
2121
{
22-
"reasoning": "<why this trajectory and probe point expose the student's intermediate state>",
22+
"reasoning": "<why this trajectory and probe point expose the target's intermediate state>",
2323
"probe_target_id": "<trajectory id>",
2424
"probe_after_step": <integer step number>,
25-
"probe_instruction": "<the exact instruction text to append to the student's prompt>"
25+
"probe_instruction": "<the exact instruction text to append to the target's prompt>"
2626
}

‎skillopt/envs/mathverse/adapter.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from skillopt.envs.mathverse.rollout import run_batch
1111
from skillopt.gradient.deep_probe import generate_deep_probe_instruction
1212
from skillopt.gradient.reflect import run_minibatch_reflect
13-
from skillopt.model import get_student_backend
13+
from skillopt.model import get_target_backend
1414

1515

1616
class MathVerseAdapter(EnvAdapter):
@@ -176,7 +176,7 @@ def deep_reflect(
176176
selected_ids = {str(item["id"]) for item in selected_items}
177177
selected_results = [row for row in results if str(row.get("id")) in selected_ids]
178178
selected_examples = self.attach_reference_context(selected_results, selected_items)
179-
codex_backend = get_student_backend() == "codex_exec"
179+
codex_backend = get_target_backend() == "codex_exec"
180180
if codex_backend:
181181
selected_examples = self.attach_codex_probe_context(selected_examples, prediction_dir)
182182
selected_metadata = []

0 commit comments

Comments
 (0)