Repository navigation
feat(config): assemble components through backend definitions - #424
Merged
Merged
Conversation
|
Merge Oncall: @BobbyZhouZijian The merge oncall will route reviews and keep this pull request moving toward a clear decision. |
3 of 16 tasks
3 of 11 tasks
BobbyZhouZijian
marked this pull request as ready for review
September 12, 2026 18:13
BobbyZhouZijian
requested review from
Benjamin-eecs,
hanfeiyu and
simonucl
as code owners
September 12, 2026 18:13
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Versioned deployments still expose HTTP process commands and training bridge wiring in YAML. This implements #414's contributor-directed boundary: users configure components, Reef assembles native inference/training, and recipes consume independently deployed method services through endpoints. The broader RFC remains proposed, so this PR remains a draft.
Changes
service,servicesandexecution.servicesfrom v2 configuration. HTTP settings and canonical flags usereef.*, including--reef.portand--reef.token. CLI and YAML use the same selected-component parser with CLI precedence.training.backendthrough a built-in name, installedreef.training_backendsentry point, or dottedTrainingDeploymentclass. Each definition owns process preparation and HTTP runtime configuration. Backend selection and service assembly sharereef/service/deploy/training.py; extension contracts live inreef/train/deployment.py.InProcessTrainingDeploymentstarts only HTTP and uses its RuntimeFactory to validate options and create a TrainingRuntime. Missing backends fail without falling back to Slime.cli.py, theServiceConfigvalue andservice_config_from_mapping()conversion inservice_config.py,DeploymentConfigdefaults, selected schemas and public layout indeployment_config.py. Keep YAML loading and interpolation inconfig_utils.py, move process validation toexecution.py, and consolidate provider/local inference plus model preparation ininference.py. Remove forwarding-only argument modules and update imports and the codebase guide.RuntimeTrainingBackend; the oldSlimeTrainingBackendimport remains an alias. CPU contracts prove an installed in-process backend works without importing Slime/Ray/SGLang/Torch/MLX.Compatibility and operational impact
This intentionally revises the initial v2 layout from #417: move
servicefields toreef, use--reef.*instead of--service.*, and remove explicit process lists. Method-specific services are independently deployed. OpenClawRL usesrecipe.config.prm-urlandrecipe.config.prm-tokenizer-path; it exposes no auxiliary launch settings. In the example, usedocker compose downto stop all three containers; shutting down Reef alone leaves the auxiliary services running. External Ray clusters must exclude PRM/user-model GPUs. Unversioned legacy files retain explicit stacks and their existing override/command semantics.Managed Slime launches ignore ambient
SLIME_ARGS_FILEand usetraining.options. Existing Ray clusters remain externally owned. Slime's default environment setsCUDA_DEVICE_MAX_CONNECTIONS=1andNCCL_NVLS_ENABLE=0, honoring operator overrides; this preserves the former TTTD/CORAL/OpenClawRL YAML defaults and also applies them to SAO. Migrated examples preserve their separate HTTP/driver readiness deadlines. Experiment metadata now namesRuntimeTrainingBackendand the actual runtime class instead of labeling all weight training as Slime. Launch and app-assembly entrypoints inreef.service.deployremain available. The Python configuration type and converter are nowServiceConfigandservice_config_from_mapping(); callers usingServiceSettingsorservice_settings_from_config()must update those names. Internal imports fromdeploy.config,settings,components,layout,options,argumentsandprovidermust use their new owning modules; repository callers are updated. No HTTP wire, persistence or numerical algorithm changes.Verification
NO_PROXY='*' no_proxy='*' GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null .venv/bin/python -m pytest tests -n 4 --dist loadfile --cov=reef --cov-report=term -q --tb=short: 3341 passed, 48 skipped, 88.24% coverage.REEF_TEST_RAY=1 ... pytest tests/reef_service/test_openclawrl_gpu_pool.py -k openclawrl: 8 passed, covering local/external Ray and OpenClawRL's five logical model GPUs. No GPU kernels were run.pre-commit run --all-files: passed; after the final test-fixture update, its focused hooks also passed. Mypy with lint CI dependencies: 264 source files passed.npm run check:docs,npm run lint,npm run buildpassed; dependencies were already installed withnpm ciearlier in this PR.docker compose ... config --quietandbash -n .../run.sh: passed. The three-container GPU stack was not started locally.81cc9c9; its results are separate from the completed local checks above.This supplies the deployment extension boundary for #325, without merging its MLX numerical implementation. Real MLX/Metal and Slime/Megatron/SGLang training runs were not performed. CPU tests verify configuration, runtime construction and process lifecycle, not numerical or GPU acceptance.
AI assistance
OpenAI Codex implemented the contributor-directed change, added tests, updated documentation and ran verification. The human contributor remains responsible for reviewing and understanding the implementation and results.
Checklist
README.i18n.yaml, or do not affect README content.Review and merge
Draft follow-up to #414 and merged #417. RFC acceptance and GPU validation remain outstanding.