Files
OpenGait/opengait/AGENTS.md
T

1.7 KiB
Raw Blame History

OPENGAIT RUNTIME KNOWLEDGE BASE

OVERVIEW

opengait/ is the runtime package: distributed launch entry, model lifecycle orchestration, data/evaluation integration.

STRUCTURE

opengait/
├── main.py         # DDP entrypoint + config load + model dispatch
├── modeling/       # BaseModel + model/backbone/loss registries
├── data/           # dataset parser + sampler/collate/transform
├── evaluation/     # benchmark-specific evaluation functions
└── utils/          # config merge, DDP passthrough, logging helpers

WHERE TO LOOK

Task Location Notes
Start train/test flow main.py parses --cfgs/--phase, initializes DDP
Resolve model name from YAML modeling/models/__init__.py class auto-registration via iter_modules
Build full train loop modeling/base_model.py loaders, optimizer/scheduler, ckpt, inference
Merge config with defaults utils/common.py::config_loader overlays onto configs/default.yaml
Shared logging utils/msg_manager.py global message manager

CONVENTIONS

  • Imports are package-relative-at-runtime (from modeling..., from data..., from utils...) because opengait/main.py is launched as script target.
  • Runtime is DDP-first; non-DDP assumptions are usually invalid.
  • Losses and models are configured by names, not direct imports in main.py.

ANTI-PATTERNS

  • Dont bypass config_loader; default config merge is expected by all modules.
  • Dont instantiate models outside registry path (modeling/models), or YAML model_cfg.model lookup breaks.
  • Dont bypass get_ddp_module; attribute passthrough wrapper is used for downstream method access.