Studio: drop redundant issue refs from inheritance comments
This commit is contained in:
parent
9d763fa9a5
commit
f67514d145
3 changed files with 9 additions and 11 deletions
|
|
@ -2688,7 +2688,7 @@ class LlamaCppBackend:
|
|||
# failed startup can't poison the next inheritance check.
|
||||
# None keeps prior, [] clears, list sets. Source records
|
||||
# the caller's hf_variant (None for local files) so the
|
||||
# route's same_source check stays symmetric (#5401).
|
||||
# route's same_source check stays symmetric.
|
||||
if extra_args is not None:
|
||||
self._extra_args = list(extra_args)
|
||||
self._extra_args_source = (model_identifier, hf_variant)
|
||||
|
|
@ -2740,7 +2740,7 @@ class LlamaCppBackend:
|
|||
return False
|
||||
# Direct-file loads pass hf_variant=None while the backend
|
||||
# stores an extracted filename label; compare paths instead
|
||||
# to keep the guard symmetric (#5401).
|
||||
# to keep the guard symmetric.
|
||||
if gguf_path is not None and self._gguf_path:
|
||||
try:
|
||||
if Path(self._gguf_path).resolve() != Path(gguf_path).resolve():
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ def is_managed_flag(flag: str) -> bool:
|
|||
# (max_seq_length, cache_type_kv, speculative_type,
|
||||
# chat_template_override). Stripped from inherited extras so they
|
||||
# can't last-wins-override an Apply that re-sets the same first-class
|
||||
# field (#5401).
|
||||
# field.
|
||||
_CONTEXT_FLAGS: frozenset[str] = frozenset({"-c", "--ctx-size"})
|
||||
_CACHE_FLAGS: frozenset[str] = frozenset(
|
||||
{"-ctk", "--cache-type-k", "-ctv", "--cache-type-v"}
|
||||
|
|
@ -155,7 +155,7 @@ _SHADOWING_FLAGS: frozenset[str] = (
|
|||
|
||||
# Boolean flags inside _SHADOWING_FLAGS that take no value. The
|
||||
# value-consuming heuristic in strip_shadowing_flags must skip just the
|
||||
# flag for these, never the following token (#5401).
|
||||
# flag for these, never the following token.
|
||||
_BOOLEAN_SHADOWING_FLAGS: frozenset[str] = frozenset(
|
||||
{"--spec-default", "--jinja", "--no-jinja"}
|
||||
)
|
||||
|
|
@ -178,7 +178,7 @@ def strip_shadowing_flags(
|
|||
group; the route only strips groups whose corresponding first-class
|
||||
field was actually supplied by the caller, so an inherited
|
||||
``--chat-template-file`` survives an Apply that omits both
|
||||
``llama_extra_args`` and ``chat_template_override`` (#5401).
|
||||
``llama_extra_args`` and ``chat_template_override``.
|
||||
"""
|
||||
shadowing: set[str] = set()
|
||||
if strip_context:
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ def _request_matches_loaded_settings(
|
|||
# llama_extra_args=None means "inherit"; only an explicit list that
|
||||
# differs forces a reload. On the inherit path, refuse to match if
|
||||
# stored extras contain any shadow flag, so the reload path can
|
||||
# strip them instead of leaving a stale override in effect (#5401).
|
||||
# strip them instead of leaving a stale override in effect.
|
||||
backend_extra = list(llama_backend.extra_args) if llama_backend.extra_args else []
|
||||
if request.llama_extra_args is None:
|
||||
if backend_extra and strip_shadowing_flags(backend_extra) != backend_extra:
|
||||
|
|
@ -519,8 +519,7 @@ async def load_model(
|
|||
except ValueError as exc:
|
||||
raise HTTPException(status_code = 400, detail = str(exc))
|
||||
# Re-narrow []-from-None back to None so the inheritance path
|
||||
# below can tell "caller omitted" from "caller explicit []"
|
||||
# (#5401).
|
||||
# below can tell "caller omitted" from "caller explicit []".
|
||||
extra_llama_args: Optional[list[str]] = (
|
||||
None if request.llama_extra_args is None else extra_llama_args
|
||||
)
|
||||
|
|
@ -685,8 +684,7 @@ async def load_model(
|
|||
# Inheritance is gated on (model_identifier, hf_variant)
|
||||
# to refuse cross-model pickup, and shadowing flags are
|
||||
# stripped so an inherited override can't win the last-wins
|
||||
# CLI parse against a freshly-supplied first-class field
|
||||
# (#5401).
|
||||
# CLI parse against a freshly-supplied first-class field.
|
||||
if request.llama_extra_args is None and llama_backend.extra_args:
|
||||
source = llama_backend.extra_args_source
|
||||
same_source = bool(
|
||||
|
|
@ -710,7 +708,7 @@ async def load_model(
|
|||
# Strip only the groups whose first-class field
|
||||
# was actually set by the caller, so an inherited
|
||||
# --chat-template-file survives an Apply that omits
|
||||
# chat_template_override (#5401).
|
||||
# chat_template_override.
|
||||
fields_set = getattr(request, "model_fields_set", set())
|
||||
stripped = strip_shadowing_flags(
|
||||
llama_backend.extra_args,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue