File size: 1,424 Bytes
3d47ea1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | """HYDRA autoresearch training entry point.
Thin shim over the `hydra/` package (W1 modularization). The heavy lifting
lives in:
hydra/config.py β PostSemClawConfig dataclass + env var constants
hydra/engram.py β GPUEngram (conditional memory, Hebbian writes)
hydra/optimizer.py β MuonAdamW + fused Muon/AdamW step kernels
hydra/model.py β PostSemClawModel assembly + forward
hydra/eval.py β factual probes + factual English scoring
hydra/training.py β training loop + main()
Public API is re-exported below for back-compat with tests/ and scripts/
that still `from train import ...`.
Usage: `uv run train.py`
"""
from __future__ import annotations
# Re-exports for back-compat. Importing hydra.model is safe (no side effects).
from hydra.config import PostSemClawConfig
from hydra.engram import GPUEngram
from hydra.model import PostSemClawModel, norm
from hydra.optimizer import (
MuonAdamW,
adamw_step_fused,
muon_step_fused,
polar_express_coeffs,
)
# MAX_SEQ_LEN is often imported from train by tooling; forward from prepare.
from prepare import MAX_SEQ_LEN # noqa: F401
__all__ = [
"PostSemClawConfig",
"PostSemClawModel",
"GPUEngram",
"MuonAdamW",
"adamw_step_fused",
"muon_step_fused",
"polar_express_coeffs",
"norm",
"MAX_SEQ_LEN",
]
if __name__ == "__main__":
from hydra.training import main
main()
|