| 10 | |
| 11 | |
| 12 | def parse_args() -> argparse.Namespace: |
| 13 | parser = argparse.ArgumentParser(description="Run Agent4Edu learner simulation.") |
| 14 | parser.add_argument("--data-dir", type=Path, default=DATA_PATH, help="Directory containing stu_logs/profile/kcg files.") |
| 15 | parser.add_argument("--result-dir", type=Path, default=RESULT_PATH, help="Directory to save simulation outputs.") |
| 16 | parser.add_argument("--students", type=str, default="0", help="Comma-separated row indices in stu_logs.json. Example: 0,1,2") |
| 17 | parser.add_argument("--student-ids", action="store_true", help="Treat --students as actual user_id values instead of row indices.") |
| 18 | parser.add_argument("--max-steps", type=int, default=0, help="Max exercises per student. 0 means all logs.") |
| 19 | parser.add_argument("--llm-provider", type=str, default=None, choices=["mock", "openai"], help="Override AGENT4EDU_LLM_PROVIDER.") |
| 20 | return parser.parse_args() |
| 21 | |
| 22 | |
| 23 | def select_students(all_students: list[dict], selector: str, by_id: bool) -> list[dict]: |