[DYNAMO] feat: DynamoAdminAPI + client.backend selector#2398
Draft
AmeenP wants to merge 1 commit intorefactor/admin-api-protocolfrom
Draft
[DYNAMO] feat: DynamoAdminAPI + client.backend selector#2398AmeenP wants to merge 1 commit intorefactor/admin-api-protocolfrom
AmeenP wants to merge 1 commit intorefactor/admin-api-protocolfrom
Conversation
83a0377 to
d79c6ce
Compare
Adds the second AdminAPI implementation foreshadowed in the refactor PR.
Default behavior is unchanged -- you get DynamoAdminAPI by setting
``client.backend = "dynamo"`` in the config.
What's actually different about Dynamo today:
* /v1/rl/load_lora_adapter, /v1/rl/health, /v1/rl/pause, /v1/rl/resume,
/v1/rl/update_weights -- same relative paths as vLLM, just under a
different admin_base_url prefix. DynamoAdminAPI inherits these
unchanged from VLLMAdminAPI; httpx joins them onto admin_base_url.
* /v1/models -- Dynamo serves this at the OpenAI-compat root, NOT
under /v1/rl/. DynamoAdminAPI overrides ``list_models`` to send an
absolute URL that bypasses the admin prefix.
This makes the model existence check work against Dynamo without
``skip_model_check = true`` (today's workaround in biswapanda's example
configs).
Wiring:
* StaticInferencePool builds a backend-specific AdminAPI in __init__
and threads it through wait_for_ready / update_weights.
* ElasticInferencePool does the same for load_lora_adapter and the
per-tick model check inside _check_server_health (the inline /health
call there is left alone -- it has different raise_for_status
semantics from AdminAPI.health and is out of scope for this PR).
What's NOT in this PR:
* No path migration. If Dynamo moves additional endpoints out of
/v1/rl/ later, those are method-level overrides on DynamoAdminAPI
-- localised, not scattered across configs.
* No collapsing of skip_model_check / use_token_client into backend
defaults -- those are separate concerns that touch other code paths.
d79c6ce to
52aac5c
Compare
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
Second AdminAPI implementation, foreshadowed by #2397. Default behavior is byte-identical to today; opt-in via
client.backend = "dynamo".Stacked on #2397 — base branch is
refactor/admin-api-protocol. Once #2397 merges, rebase againstmain.What's actually different about Dynamo
health,pause,resume,update_weights,load_lora_adapter,init_broadcaster…/v1/rlvs…/v1)VLLMAdminAPI— httpx joins relative paths onto admin_base_url.list_models/v1/models), not under/v1/rl/That is it: one method override.
Why this fixes a real bug
Today, against Dynamo:
The
skip_model_check = truepapers over the fact thatVLLMAdminAPI.list_modelsresolves to…/v1/rl/v1/models(httpx joins, does not host-anchor), which 404s. Withbackend = "dynamo"set,DynamoAdminAPI.list_modelsconstructs an absolute URL anchored at the host, so the model check actually runs.Wiring
client.backend: Literal["vllm", "dynamo"] = "vllm"added toClientConfig.setup_admin_api(client_config)selector.AdminAPIand pass it to model readiness and weight/LoRA update paths.What's NOT in this PR
_check_server_health/healthcall inelastic.pyis left inline; it has different raise-for-status semantics./v1/rl/; that would be a method override onDynamoAdminAPI.Verification
git diff --checkuv run --no-sync python -m py_compile src/prime_rl/utils/client.py src/prime_rl/utils/elastic.py src/prime_rl/configs/shared.pyuv run --no-sync ruff check src/prime_rl/utils/client.py src/prime_rl/utils/elastic.py src/prime_rl/configs/shared.pyis currently blocked by import sorting inclient.pyandelastic.py.