[
  {
    "id": "environment",
    "command": "./poet doctor",
    "argv": [
      "./poet",
      "doctor"
    ],
    "stdin": null,
    "stdout": "{\n  \"Python\": \"3.12.12\",\n  \"PyTorch\": \"2.8.0\",\n  \"平台\": \"macOS-15.7.9-arm64-arm-64bit\",\n  \"Mac加速可用\": true,\n  \"NVIDIA加速可用\": false,\n  \"默认设备\": \"mps\",\n  \"材料已准备\": true,\n  \"模型已训练\": true,\n  \"课程入口\": \"/Users/saymagic/workspace/chinese-poetry/course/dist/index.html\"\n}\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 1.318,
    "recorded_at": "2026-09-19T00:55:42.484194+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "materials",
    "command": ".venv/bin/python lessons/03/inspect_material.py",
    "argv": [
      ".venv/bin/python",
      "lessons/03/inspect_material.py"
    ],
    "stdin": null,
    "stdout": "整理结果：\n{\n  \"source_counts\": {\n    \"tang\": 57607,\n    \"song\": 254248\n  },\n  \"split_counts\": {\n    \"train\": 87236,\n    \"val\": 4869,\n    \"test\": 4790\n  },\n  \"vocab_size\": 6646\n}\n应当存在的文件：\n  train.jsonl     存在\n  val.jsonl       存在\n  test.jsonl      存在\n  vocab.json      存在\n  manifest.json   存在\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 0.025,
    "recorded_at": "2026-09-19T00:55:42.510196+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "pairs",
    "command": "./poet lesson 4",
    "argv": [
      "./poet",
      "lesson",
      "4"
    ],
    "stdin": null,
    "stdout": "第 04 课 · 可运行实验（CPU）\n字编号： [9, 10, 11, 12, 13]\n输入： [9, 10, 11, 12]\n目标： [10, 11, 12, 13]\n春 → 江\n春江 → 花\n春江花 → 月\n春江花月 → 夜\n练习：把句子改成 明月照山河，重新列出输入与目标，确认目标恰好向后移动一位。\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 0.795,
    "recorded_at": "2026-09-19T00:55:43.305964+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "training",
    "command": "./poet train --config configs/tiny.json --run-dir artifacts/runs/illustrated-demo --steps 50 --batch-size 24 --device mps",
    "argv": [
      "./poet",
      "train",
      "--config",
      "configs/tiny.json",
      "--run-dir",
      "artifacts/runs/illustrated-demo",
      "--steps",
      "50",
      "--batch-size",
      "24",
      "--device",
      "mps"
    ],
    "stdin": null,
    "stdout": "{\"device\": \"mps\", \"parameters\": 1453952, \"start_step\": 0, \"target_steps\": 50, \"train_poems\": 87236}\n{\"event\": \"baseline\", \"step\": 0, \"val_loss\": 8.826677150827237}\n{\"event\": \"train\", \"step\": 1, \"loss\": 8.833823204040527, \"lr\": 0.00014000000000000001, \"seconds\": 0.77, \"steps_per_second\": 1.296}\n{\"event\": \"train\", \"step\": 25, \"loss\": 7.221395969390869, \"lr\": 0.0004541603328559118, \"seconds\": 1.25, \"steps_per_second\": 20.039}\n{\"event\": \"train\", \"step\": 50, \"loss\": 6.819660186767578, \"lr\": 0.00010499999999999999, \"seconds\": 1.71, \"steps_per_second\": 29.257}\n{\"event\": \"validation\", \"step\": 50, \"val_loss\": 6.8024335038725035, \"best_val\": 6.8024335038725035, \"peak_process_rss_mib\": 545.6, \"mps_driver_allocated_mib\": 1166.2}\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 4.096,
    "recorded_at": "2026-09-19T00:55:47.402201+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "resume",
    "command": "./poet train --run-dir artifacts/runs/illustrated-demo --resume artifacts/runs/illustrated-demo/latest.pt --steps 75 --device mps",
    "argv": [
      "./poet",
      "train",
      "--run-dir",
      "artifacts/runs/illustrated-demo",
      "--resume",
      "artifacts/runs/illustrated-demo/latest.pt",
      "--steps",
      "75",
      "--device",
      "mps"
    ],
    "stdin": null,
    "stdout": "{\"device\": \"mps\", \"parameters\": 1453952, \"start_step\": 50, \"target_steps\": 75, \"train_poems\": 87236}\n{\"event\": \"train\", \"step\": 75, \"loss\": 6.691915988922119, \"lr\": 0.00010499999999999999, \"seconds\": 2.63, \"steps_per_second\": 34.553}\n{\"event\": \"validation\", \"step\": 75, \"val_loss\": 6.640265357305133, \"best_val\": 6.640265357305133, \"peak_process_rss_mib\": 563.9, \"mps_driver_allocated_mib\": 1190.2}\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 2.968,
    "recorded_at": "2026-09-19T00:55:50.370697+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "cli-parse",
    "command": ".venv/bin/python lessons/24/build_cli/01_arguments.py --start '春' --form five",
    "argv": [
      ".venv/bin/python",
      "lessons/24/build_cli/01_arguments.py",
      "--start",
      "春",
      "--form",
      "five"
    ],
    "stdin": null,
    "stdout": "{\n  \"start\": \"春\",\n  \"keywords\": \"\",\n  \"form\": \"five\"\n}\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 0.036,
    "recorded_at": "2026-09-19T00:55:50.406908+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "cli-write",
    "command": ".venv/bin/python lessons/24/build_cli/02_write.py --start '春' --device cpu",
    "argv": [
      ".venv/bin/python",
      "lessons/24/build_cli/02_write.py",
      "--start",
      "春",
      "--device",
      "cpu"
    ],
    "stdin": null,
    "stdout": "春色三分别，\n春来一日来。\n东风吹一笑，\n莫负酒家开。\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 1.765,
    "recorded_at": "2026-09-19T00:55:52.173059+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "cli-output",
    "command": ".venv/bin/python lessons/24/build_cli/03_output.py --keywords '明月' --json --output reports/illustrated/stage3-poem.json --device cpu",
    "argv": [
      ".venv/bin/python",
      "lessons/24/build_cli/03_output.py",
      "--keywords",
      "明月",
      "--json",
      "--output",
      "reports/illustrated/stage3-poem.json",
      "--device",
      "cpu"
    ],
    "stdin": null,
    "stdout": "[\n  {\n    \"text\": \"白玉人无影，青灯耿不明。明月照空碧，谁人夜亦声。\",\n    \"lines\": [\n      \"白玉人无影，\",\n      \"青灯耿不明。\",\n      \"明月照空碧，\",\n      \"谁人夜亦声。\"\n    ],\n    \"form\": 5,\n    \"model_step\": 18000,\n    \"keywords\": [\n      \"明月\"\n    ],\n    \"keyword_literal_hits\": [\n      \"明月\"\n    ],\n    \"keyword_rule_score\": 1.0,\n    \"model_mean_log_probability\": -2.855,\n    \"selection_score\": -0.855,\n    \"corpus_exact_match\": false,\n    \"repeated_bigrams\": 0,\n    \"repeated_line_endings\": 0,\n    \"corpus_check_available\": true,\n    \"corpus_check_note\": \"已对与模型版本匹配的三份材料执行整首精确重复检查。\"\n  }\n]\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 1.787,
    "recorded_at": "2026-09-19T00:55:53.960896+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "cli-error",
    "command": ".venv/bin/python lessons/24/build_cli/03_output.py --count 0 --device cpu",
    "argv": [
      ".venv/bin/python",
      "lessons/24/build_cli/03_output.py",
      "--count",
      "0",
      "--device",
      "cpu"
    ],
    "stdin": null,
    "stdout": "",
    "stderr": "提示：每次生成数量应在 1—20 之间。\n",
    "exit_code": 2,
    "expected_exit_code": 2,
    "seconds": 1.597,
    "recorded_at": "2026-09-19T00:55:55.558375+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "write-prefix",
    "command": "./poet write --start '春' --form five --seed 2026 --device cpu",
    "argv": [
      "./poet",
      "write",
      "--start",
      "春",
      "--form",
      "five",
      "--seed",
      "2026",
      "--device",
      "cpu"
    ],
    "stdin": null,
    "stdout": "春色三分别，\n春来一日来。\n东风吹一笑，\n莫负酒家开。\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 1.774,
    "recorded_at": "2026-09-19T00:55:57.333309+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "write-keywords",
    "command": "./poet write --keywords '秋雨,故乡' --form seven --json --seed 2026 --device cpu",
    "argv": [
      "./poet",
      "write",
      "--keywords",
      "秋雨,故乡",
      "--form",
      "seven",
      "--json",
      "--seed",
      "2026",
      "--device",
      "cpu"
    ],
    "stdin": null,
    "stdout": "[\n  {\n    \"text\": \"万古长空四望间，故人应是故乡闲。西陵一抹阳关月，归到庐山更白山。\",\n    \"lines\": [\n      \"万古长空四望间，\",\n      \"故人应是故乡闲。\",\n      \"西陵一抹阳关月，\",\n      \"归到庐山更白山。\"\n    ],\n    \"form\": 7,\n    \"model_step\": 18000,\n    \"keywords\": [\n      \"秋雨\",\n      \"故乡\"\n    ],\n    \"keyword_literal_hits\": [\n      \"故乡\"\n    ],\n    \"keyword_rule_score\": 0.5,\n    \"model_mean_log_probability\": -3.009,\n    \"selection_score\": -2.009,\n    \"corpus_exact_match\": false,\n    \"repeated_bigrams\": 0,\n    \"repeated_line_endings\": 0,\n    \"corpus_check_available\": true,\n    \"corpus_check_note\": \"已对与模型版本匹配的三份材料执行整首精确重复检查。\"\n  }\n]\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 1.956,
    "recorded_at": "2026-09-19T00:55:59.290419+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "write-errors",
    "command": "./poet write --count 0 --device cpu",
    "argv": [
      "./poet",
      "write",
      "--count",
      "0",
      "--device",
      "cpu"
    ],
    "stdin": null,
    "stdout": "",
    "stderr": "提示：每次生成数量应在 1—20 之间。\n",
    "exit_code": 2,
    "expected_exit_code": 2,
    "seconds": 1.605,
    "recorded_at": "2026-09-19T00:56:00.896385+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "chat",
    "command": "./poet chat --device cpu",
    "argv": [
      "./poet",
      "chat",
      "--device",
      "cpu"
    ],
    "stdin": "/start 春\n/quit\n",
    "stdout": "古诗写作。输入 /quit 退出；输入 /start 春 指定开头；其他文字作为关键词。\n关键词或开头 > 春色三分别，\n春来一日来。\n东风吹一笑，\n莫负酒家开。\n关键词或开头 > ",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 1.845,
    "recorded_at": "2026-09-19T00:56:02.742293+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "help",
    "command": "./poet --help",
    "argv": [
      "./poet",
      "--help"
    ],
    "stdin": null,
    "stdout": "usage: poet [-h] {doctor,prepare,train,write,chat,evaluate,lesson,course} ...\n\n从一字到一首诗：本地古诗 GPT 学习工具\n\npositional arguments:\n  {doctor,prepare,train,write,chat,evaluate,lesson,course}\n    doctor              检查环境、材料和模型\n    prepare             整理诗词，生成训练材料\n    train               从零训练，或继续已有进度\n    write               按首字或关键词写诗\n    chat                按中文提示连续写诗\n    evaluate            在保留材料上检查预测误差\n    lesson              运行某节课的小实验\n    course              显示离线课程入口或启动本地阅读服务\n\noptions:\n  -h, --help            show this help message and exit\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 0.036,
    "recorded_at": "2026-09-19T00:56:02.778596+00:00",
    "kind": "本次复现命令"
  },
  {
    "id": "course",
    "command": "./poet course --status",
    "argv": [
      "./poet",
      "course",
      "--status"
    ],
    "stdin": null,
    "stdout": "课程服务正在运行：http://127.0.0.1:8766/（进程 4300）\n",
    "stderr": "",
    "exit_code": 0,
    "expected_exit_code": 0,
    "seconds": 0.055,
    "recorded_at": "2026-09-19T00:56:02.834061+00:00",
    "kind": "本次复现命令"
  }
]