Files
agentic-ctx/workflows/development.md

51 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AI Infra Development Workflow
用于 AI Infra research 项目的 GPU 开发测试和长期实验。默认 GPU 相关工作发生在 `dash*` 共享机器上。
## Host Model
- GPU hosts 命名为 `dash0`, `dash1`, ...;以当前 `~/.ssh/config` 为准,直接 `ssh dash*`
- 如果某台配置过的 `dash*` 无法连接,视为机器已下线,跳过即可。
- 所有 `dash*` mount 同一个 NAS-backed `$HOME`HOME 内路径在不同机器上等价。
- 不需要在不同 `dash*` 之间做额外文件同步。
- 个人 git remote 通常是 gitea例如 `git@gitea:gahow/<repo>.git`
## Before GPU Work
占用 GPU 前必须先判断空闲卡数。不要默认独占共享机器。
1. 枚举候选 `dash*`
2. 跳过无法 ssh 的机器。
3. 在可达机器上运行 `nvidia-smi`
4. 检查空闲 GPU 数、显存占用和已有用户进程。
5. 只在有足够空闲 GPU 的机器上启动开发测试或实验,并记录 host 与 GPU ids。
## Code And Data
- 代码同步:使用 git必要时 push/pull 到个人 gitea。
- 大规模日志、checkpoint、trace、临时数据保留在 `dash*` 可访问的本地/NAS 路径,不进 git。
- 长期实验必须记录 repo commit、命令、配置、机器名、GPU 分配、日志路径和启动时间。
- 能被后续 agent 继续处理的结果优先落成稳定文件JSON/JSONL、CSV、日志目录、分析脚本或 README。
## Rules
- 不要因为某个 `dash*` 连接失败而中断整个任务;继续尝试其它 `dash*`
- 不要假设不同机器有不同 HOME除非用户特别说明路径在所有 `dash*` 上等价。
- 不要把大日志或实验产物加入 git只提交代码、脚本、配置模板和必要文档。
- 如果真实 GPU 环境跑不通,报告机器、命令、错误和已检查的 GPU 状态。
## Minimal Run Record
```yaml
repo:
commit:
host:
gpu_ids:
command:
config:
start_time:
log_path:
result_path:
notes:
```