Repository navigation
feat(inference): add mooncake-master entrypoint and Kubernetes Mooncake client setup (ENG-9128) - #4916
Open
cabrinha wants to merge 2 commits into
Open
feat(inference): add mooncake-master entrypoint and Kubernetes Mooncake client setup (ENG-9128)#4916cabrinha wants to merge 2 commits into
cabrinha wants to merge 2 commits into
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
cabrinha
force-pushed
the
feat/k8s-mooncake-offload-eng-9128
branch
from
December 2, 2026 22:56
a4f7a3c to
90e443f
Compare
cabrinha
marked this pull request as ready for review
December 2, 2026 22:56
cabrinha
force-pushed
the
feat/k8s-mooncake-offload-eng-9128
branch
from
December 3, 2026 00:09
90e443f to
7dbd184
Compare
samsja
reviewed
Dec 3, 2026
cabrinha
force-pushed
the
feat/k8s-mooncake-offload-eng-9128
branch
2 times, most recently
from
December 3, 2026 01:11
0ffff9b to
80fd275
Compare
cabrinha
force-pushed
the
feat/k8s-mooncake-offload-eng-9128
branch
from
December 3, 2026 21:00
3f18da8 to
54d3af0
Compare
This branch has not been deployed
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.
Summary
Keeps Mooncake KV-cache offload configuration and launch logic inside
prime-rl(matching prime-rl#4887's thin-orchestrator boundary) for ENG-9128.python -m prime_rl.entrypoints.mooncake) (prime_rl.configs.mooncake.MooncakeMasterEntrypointConfig,src/prime_rl/entrypoints/mooncake.py): reads mountedinference.json(and optional--role-configs /etc/prime-rl/inference-prefill.json /etc/prime-rl/inference-decode.jsonfor disaggregatedPrimeRuns), derives-default_kv_lease_ttland optional disk path, and execsmooncake_master.mooncake_clientsetup ininference_local(src/prime_rl/entrypoints/inference.py,src/prime_rl/utils/process.py):wait_for_port(extended with optionalprocess: Popenearly-exit checking) to wait for master RPC (50051) and HTTP metadata (8080).mooncake_clientwhencpu.num_bytes > 0(readingPRL_INFERENCE_HOST/POD_IP, with clusterMOONCAKE_DEVICE_NAMEtaking precedence over recipeoffload.device_name), writes the standalone-storeMOONCAKE_CONFIG_PATHJSON, setsPYTHONHASHSEED=0, watchesmooncake_clientmid-run (triggeringSIGTERMshutdown on unexpected exit, matchingwatch_router), and cleans up on shutdown.kv_cache_offload.type == "mooncake"runs without eitherMOONCAKE_MASTER_HOSTorMOONCAKE_CONFIG_PATH. Also setsPYTHONHASHSEED=0fornativeoffload.packages/prime-rl-configs/src/prime_rl/configs/rl.py,src/prime_rl/entrypoints/rl.py,src/prime_rl/entrypoints/launcher.py,docs/inference.md): moves the local Mooncake check torl()/launch()viarequire_mooncake_store(failing beforeprepare_run/pre_download_modelwhenslurm=Noneand neitherMOONCAKE_MASTER_HOSTnorMOONCAKE_CONFIG_PATHis set) so KubernetesRLConfig/dump_rl_componentsacceptstype = "mooncake"; SLURM launch templates remain untouched.Companion PR
prime-factory-operatorPod resource/networking/gang wiring)Verification
uv run --frozen ruff checkandruff format --check: passeduv run --frozen pytest tests/unit/test_pd_launch.py tests/unit/test_router_launch.py tests/unit/test_modelexpress_server.py(12 passed)uv run --frozen pytest tests/unit/test_configs.py -k "mooncake or pd_role or pd_bidirectional or pd_spill or dump_rl_components or default_moe_backend or for_pd_role"(8 passed)