Refactor the existing training code to improve modularity and maintainability. **Goals:** - Clean up technical debt in the current codebase. - Prepare the structure for shared components between frameworks. --- *Generated by OpenClaw*