fix(config): retain pre-engine resolution declarations (#37195)
Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
This commit is contained in:
@@ -54,11 +54,11 @@ def run_resolution_pipeline(server_args: Any) -> None:
|
|||||||
for field in dataclasses.fields(server_args)
|
for field in dataclasses.fields(server_args)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Declaration stash for the override/post-process passes. Set before any
|
# Preserve launcher-stage declarations made before Engine starts. They are
|
||||||
# short-circuit (none/dummy model paths) so run_post_process_pass and
|
# part of the same resolution result as the declarations accumulated below.
|
||||||
# direct handler invocations can rely on it even when
|
server_args._resolved_overrides = list(
|
||||||
# _handle_model_specific_adjustments never runs.
|
getattr(server_args, "_resolved_overrides", ())
|
||||||
server_args._resolved_overrides = []
|
)
|
||||||
|
|
||||||
cfg = resolving_view(server_args)
|
cfg = resolving_view(server_args)
|
||||||
|
|
||||||
|
|||||||
@@ -592,6 +592,22 @@ class TestResolutionDeclarations(CustomTestCase):
|
|||||||
"does not write back",
|
"does not write back",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_pre_engine_late_resolution_reaches_the_projection(self):
|
||||||
|
"""A launcher declaration survives the engine's first resolution pass."""
|
||||||
|
from sglang.srt.arg_groups.overrides import declare_late_resolution
|
||||||
|
|
||||||
|
server_args = ServerArgs(model_path="dummy")
|
||||||
|
declare_late_resolution(
|
||||||
|
server_args,
|
||||||
|
"launcher",
|
||||||
|
enable_forward_pass_metrics=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
server_args.resolve_once()
|
||||||
|
|
||||||
|
self.assertTrue(resolution_result(server_args, "enable_forward_pass_metrics"))
|
||||||
|
self.assertFalse(server_args.enable_forward_pass_metrics)
|
||||||
|
|
||||||
def test_validation_can_still_resolve_before_the_record_is_published(self):
|
def test_validation_can_still_resolve_before_the_record_is_published(self):
|
||||||
"""The LoRA checks resolve, so they must precede publish.
|
"""The LoRA checks resolve, so they must precede publish.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user