진입점과 config¶
프로젝트 저장소는 세 파일을 반드시 갖는다. 플랫폼은 이 셋과 config 스키마만 요구한다.
uv run train.py --config-name <name> [hydra overrides] --run-id <mlflow_run_id>
uv run evaluate.py --checkpoint <path> --suite eval_suite/<suite>.yaml --out <dir>
uv run export.py --checkpoint <path> --out <dir>/policy.onnx
| 파일 | 의무 |
|---|---|
train.py |
$CKPT_DIR 에 step_<n>.pt 주기 저장, 재시작 시 최신에서 재개. +smoke=true 면 60초 안에 종료. --distill-from 을 지원하면 증류 단계가 돈다 |
evaluate.py |
<out>/report.json (스키마) |
export.py |
policy.onnx + io_spec.json |
저장소 구조¶
configs/ Hydra. env/ reward/ algo/ randomization/ curriculum/ eval/ sweep/, config.yaml, schema.py
envs/ 환경 정의 + pytest
eval_suite/ <suite>.yaml, failure_types.yaml
deploy/ ROS 2 어댑터 (실기 프로젝트만)
train.py evaluate.py export.py
dvc.yaml dvc.lock 에셋 (원격 s3://dvc/<slug>)
pyproject.toml uv.lock 의존성은 uv 로만. pip·poetry 금지
Dockerfile FROM lab/base + uv sync --frozen
.github/workflows/ci.yaml
config 스키마¶
루트 config 의 최상위 키. configs/schema.py 가 lab_logging.schemas.ProjectConfig 를 상속해 검증하고 CI 가 실행한다.
project: <slug>
env: {...}
reward:
terms:
<term_name>: {weight: float} # 이름 = 로깅 키 reward/<term_name>
algo: {name: str, ...}
randomization: {...}
curriculum: {...}
eval: {default_suite: eval_suite/<name>.yaml}
export: {obs_keys: [...], action_dim: int}
- 보상 가중치, 랜덤화 범위, 커리큘럼은 config 에만 둔다. 보상 모듈의 숫자 리터럴은 CI 가 거부한다.
config_hash는 해석된 config 의 정규화 YAML SHA-256.
이미지¶
lab/base:<cuda>-torch<ver>-py311-<date> 위에 uv sync --frozen. latest 태그는 쓰지 않는다. 의존성이 바뀌면(uv.lock) 이미지를 다시 굽고 콘솔 설정에 태그를 적는다. resolve 단계가 저장소와 이미지의 uv.lock 불일치를 거부한다.