minimind/.vscode/launch.json

38 lines
1.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
// VSCode 调试配置。用法:左侧"运行和调试"(Ctrl+Shift+D) → 顶部下拉选配置 → F5 启动
"version": "0.2.0",
"configurations": [
{
// 调试预训练脚本(用小参数,方便单步跟)
"name": "调试: train_pretrain (小参数)",
"type": "debugpy",
"request": "launch",
"program": "/home/qiaohui/Project/minimind/trainer/train_pretrain.py",
"python": "/home/qiaohui/Project/minimind/.venv/bin/python",
// cwd 设为 trainer 目录,这样 ../dataset/ 这类相对路径才找得到
"cwd": "/home/qiaohui/Project/minimind/trainer",
"console": "integratedTerminal",
// justMyCode=false → 允许单步进入 torch/transformers/模型内部代码
"justMyCode": false,
"args": [
"--data_path", "../dataset/pretrain_t2t_mini.jsonl",
"--epochs", "1",
"--batch_size", "2",
"--num_workers", "0", // ★关键:必须设0,否则 __getitem__ 里的断点打不上
"--log_interval", "1",
"--accumulation_steps", "1"
]
},
{
// 调试数据管线小脚本(不碰GPU,最适合先理解数据流)
"name": "调试: 当前打开的文件",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"python": "/home/qiaohui/Project/minimind/.venv/bin/python",
"console": "integratedTerminal",
"justMyCode": false
}
]
}