Repository navigation
feat: package RL CLIs and deployment profile plugins - #133
Conversation
c4eef3e to
4d43e6c
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It spans CLI packaging, a dependency-direction-sensitive entry-point migration, config relocation, and bilingual doc/Docker changes whose packaging and plugin-discovery behavior warrant final human verification.
No open issues 🎉
What changed in this PR
This PR packages the RL control-plane CLIs as installed console scripts (mxtrain, mxplay, mxexport onnx/mxexport deploy) and ships generic Hydra entry configs and shared algo_base defaults inside motrix_rl.configs, keeping concrete task presets in the workspace configs/task. It implements project-first config discovery (launch-directory ./configs, explicit --config-dir, packaged fallback) via a Hydra SearchPathPlugin, decouples environment registration from training config through explicit env_modules, and migrates deployment profile-compiler discovery from an in-process decorator registry to the motrix_deploy.profiles entry-point group keyed by exact environment name. Repository scripts/ become thin wrappers, bilingual docs/Docker/demo usage are updated, and the unused GPU utility is removed.
Changes:
- Add
mxtrain/mxplay/mxexportconsole scripts and package their Hydra configs inmotrix_rl.configs, with project-first./configsdiscovery and explicitenv_modulesenvironment registration. - Replace the
register_profile_compilerdecorator registry withmotrix_deploy.profilesentry-point discovery (exact-name match, reject duplicates, load only the selected compiler), removing hardcodedmotrix_envsimports from export. - Migrate tests, bilingual documentation, Docker/demo usage, and the
DeploymentExportConfig.run→run_dirrename to the new command surface.
| File | Description |
|---|---|
| wiki/design/motrix-deploy.md | Documents entry-point profile discovery and the new mxexport deploy entry/dependency direction. |
| tests/test_task_configs.py | Composes against packaged motrix_rl.configs with a hydra.searchpath to project configs. |
| tests/test_rl_commands.py | New integration tests for installed command composition, project-first config, and help/override behavior. |
| tests/test_plugin_export_integration.py | Adds subprocess integration test for mxexport onnx parity outside the workspace. |
| tests/test_play_script.py | Imports the packaged motrix_rl.commands.play instead of loading the repo script by path. |
| tests/test_doc_generate_video_script.py | Updates expected train command to python -m motrix_rl.commands.train. |
| tests/test_deploy_export_cli.py | Uses packaged config module, export_deploy command, and run_dir selector rename. |
| tests/test_cli_config.py | Switches train/play/export_onnx composition to the packaged config module with project searchpath. |
| scripts/train.py | Reduced to a thin wrapper over the packaged command (truncated in diff). |
Review effort: Balanced
1e3c010 to
1143cff
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It is a broad cross-package migration altering packaging, entry-point discovery, plugin boundaries, and config schemas across ~90 files, which warrants final human review despite no concrete defects being found.
No open issues 🎉
Review effort: Balanced
1143cff to
069ed6d
Compare
069ed6d to
ca5baa5
Compare
Summary
Closes #131.
mxtrain/mxplaycommands, and export as explicitmxexport onnx/mxexport deploysubcommands. Preserve repository scripts as thin wrappers.motrix_rl; keep concrete task presets in workspaceconfigs/task. Discover launch-directory./configsby default, honor explicit--config-dir, and prioritize project files over packaged fallbacks.motrix_deploy.profile_compilerspackage entry points, keyed by exact environment name. Load only the selected compiler, reject duplicate providers, and remove hardcoded builtin-environment imports from deployment export. Preserve the one-waymotrix_rl -> motrix_deploydependency.Usage
mxexportrequires an explicit format. Deployment export selects exactly one ofrun_dirorenv. Installed environment packages declare their profile compilers; external projects do not need to importmotrix_envs.Validation
not slow and not numba): 504 passed, 2 skipped, 21 deselected.prek run --all-filesand whitespace checks passed.motrix_rl,motrix_deploy, andmotrix_envs; installed them without dependency replacement into an acceptance environment reusing existing dependencies. Verified command help, packaged configuration loading outside the checkout, and builtin Go2 compiler discovery/build.mxexport deployexported a synthetic SKRL-format checkpoint using an external compiler/task package entry point, with an active guard rejecting allmotrix_envsimports. Artifact parsing, payload checksums, ONNX checker, and CPU inference passed; four-sample parity maximum absolute error was1.1920928955078125e-07.Limitations
Base
Rebased onto
mainafter parent PR #130 was squash-merged, so this PR contains only the CLI/configuration/export-plugin migration.