Skip to content

refactor: extract shared training entrypoint helpers - #185

Merged
TATP-233 merged 1 commit into
mainfrom
refactor/issue-150-training-common
Apr 9, 2026
Merged

TATP-233 merged 1 commit into
mainfrom
refactor/issue-150-training-common

Conversation

@TATP-233

@TATP-233 TATP-233 commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • extract shared training entrypoint helpers into src/unilab/training/common.py
  • add src/unilab/training/backend_adapter.py to centralize motrix_legacy / motrix_play_only config adaptation
  • refactor train_rsl_rl.py, train_appo.py, train_offpolicy.py, and train_mlx_ppo.py to use the shared helpers while preserving script-level compatibility wrappers used by tests
  • add direct tests for the new training helper modules

Linked Work

Validation

  • make check
  • make test
  • Additional task-specific validation listed below

Commands actually run:

uv run python -m py_compile scripts/train_rsl_rl.py scripts/train_appo.py scripts/train_offpolicy.py scripts/train_mlx_ppo.py src/unilab/training/common.py src/unilab/training/backend_adapter.py src/unilab/training/__init__.py
uv run ruff check scripts/train_rsl_rl.py scripts/train_appo.py scripts/train_offpolicy.py scripts/train_mlx_ppo.py src/unilab/training/common.py src/unilab/training/backend_adapter.py src/unilab/training/__init__.py
uv run pytest tests/training/test_training_helpers.py tests/scripts/test_train_scripts.py -q
make check
make test
UV_CACHE_DIR=.uv-cache uv run pre-commit run --all-files

Notes:

  • UV_CACHE_DIR=.uv-cache uv run pre-commit run --all-files still reports existing pyright / mypy failures outside this change set, mainly under benchmark/, tests, and legacy script typing paths.
  • make check and make test pass for the current branch.

Impact

  • Backend impact: both
  • Platform impact: macOS
  • Training effect expected: no

Artifacts

  • W&B: N/A
  • benchmark result: N/A
  • video / screenshot: N/A
  • ONNX / checkpoint: N/A

Checklist

  • Added or updated tests where needed
  • Updated docs if behavior or workflow changed
  • Linked the driving issue
  • Noted any follow-up work explicitly

Follow-up work:

  • clean up the existing pyright / mypy failures that currently cause pre-commit --all-files to fail outside this refactor scope

@TATP-233
TATP-233 merged commit 76ba95d into main Apr 9, 2026
5 checks passed
@TATP-233
TATP-233 deleted the refactor/issue-150-training-common branch April 9, 2026 17:27
TATP-233 added a commit that referenced this pull request May 4, 2026
…mmon

refactor: extract shared training entrypoint helpers
TATP-233 added a commit that referenced this pull request May 30, 2026
…mmon

refactor: extract shared training entrypoint helpers
TATP-233 added a commit that referenced this pull request Sep 4, 2026
…mmon

refactor: extract shared training entrypoint helpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant