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>
This commit is contained in:
Cuzyoung
2026-05-24 19:22:20 +00:00
parent 7ae2d8766e
commit cff7ff6846
27 changed files with 148 additions and 178 deletions
+4 -4
View File
@@ -31,7 +31,7 @@ class SWEBenchAdapter(EnvAdapter):
step_limit: int = 50,
cost_limit: float = 3.0,
timeout_per_instance: int = 600,
student_model: str = "",
target_model: str = "",
) -> None:
self.dataset_name = dataset_name
self.hf_split = hf_split
@@ -44,7 +44,7 @@ class SWEBenchAdapter(EnvAdapter):
self.step_limit = step_limit
self.cost_limit = cost_limit
self.timeout_per_instance = timeout_per_instance
self.student_model = student_model
self.target_model = target_model
self.dataloader = SWEBenchDataLoader(
split_dir=split_dir,
data_path=data_path,
@@ -60,7 +60,7 @@ class SWEBenchAdapter(EnvAdapter):
def setup(self, cfg: dict) -> None:
super().setup(cfg)
self.student_model = str(self.student_model or cfg.get("student_model") or "gpt-5.4").strip()
self.target_model = str(self.target_model or cfg.get("target_model") or "gpt-5.4").strip()
self.dataset_name = str(self.dataset_name or cfg.get("dataset_name") or "lite").strip()
self.hf_split = str(self.hf_split or cfg.get("hf_split") or "test").strip()
self.dataloader.setup(cfg)
@@ -85,7 +85,7 @@ class SWEBenchAdapter(EnvAdapter):
items=items,
out_root=out_dir,
skill_content=skill_content,
student_model=self.student_model,
target_model=self.target_model,
dataset_name=self.dataset_name,
hf_split=self.hf_split,
workers=self.workers,
+10 -10
View File
@@ -36,8 +36,8 @@ def _setup_litellm_env() -> None:
os.environ[key] = value
def _normalize_student_model(student_model: str) -> str:
model = str(student_model or "").strip()
def _normalize_target_model(target_model: str) -> str:
model = str(target_model or "").strip()
if not model:
return "azure/gpt-5.4"
if "/" in model:
@@ -57,7 +57,7 @@ def _load_json(path: str) -> dict | list | None:
def _build_agent_config(
*,
skill_content: str,
student_model: str,
target_model: str,
step_limit: int,
cost_limit: float,
) -> tuple[dict, str]:
@@ -88,7 +88,7 @@ def _build_agent_config(
"cost_limit": float(cost_limit),
},
"model": {
"model_name": _normalize_student_model(student_model),
"model_name": _normalize_target_model(target_model),
"cost_tracking": "ignore_errors",
},
}
@@ -120,7 +120,7 @@ def _run_rollout(
items: list[dict],
predictions_dir: str,
skill_content: str,
student_model: str,
target_model: str,
workers: int,
step_limit: int,
cost_limit: float,
@@ -136,7 +136,7 @@ def _run_rollout(
_setup_litellm_env()
config, system_prompt = _build_agent_config(
skill_content=skill_content,
student_model=student_model,
target_model=target_model,
step_limit=step_limit,
cost_limit=cost_limit,
)
@@ -190,9 +190,9 @@ def _run_rollout(
).strip()
with open(task_dir / "conversation.json", "w", encoding="utf-8") as f:
json.dump(messages, f, ensure_ascii=False, indent=2)
with open(task_dir / "student_system_prompt.txt", "w", encoding="utf-8") as f:
with open(task_dir / "target_system_prompt.txt", "w", encoding="utf-8") as f:
f.write(system_prompt)
with open(task_dir / "student_user_prompt.txt", "w", encoding="utf-8") as f:
with open(task_dir / "target_user_prompt.txt", "w", encoding="utf-8") as f:
f.write(user_prompt)
results.append(
@@ -288,7 +288,7 @@ def run_batch(
items: list[dict],
out_root: str,
skill_content: str,
student_model: str,
target_model: str,
dataset_name: str,
hf_split: str,
workers: int,
@@ -314,7 +314,7 @@ def run_batch(
items=items,
predictions_dir=predictions_dir,
skill_content=skill_content,
student_model=student_model,
target_model=target_model,
workers=workers,
step_limit=step_limit,
cost_limit=cost_limit,