[Bugfix] Remove unsupported comma-separated detailed trace values (#55702)
Signed-off-by: git-jxj <65210887+git-jxj@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from functools import cached_property
|
||||
from typing import Any, Literal, cast
|
||||
from typing import Any, Literal
|
||||
|
||||
from packaging.version import parse
|
||||
from pydantic import Field, field_validator, model_validator
|
||||
@@ -150,17 +150,6 @@ class ObservabilityConfig:
|
||||
)
|
||||
return value
|
||||
|
||||
@field_validator("collect_detailed_traces")
|
||||
@classmethod
|
||||
def _validate_collect_detailed_traces(
|
||||
cls, value: list[DetailedTraceModules] | None
|
||||
) -> list[DetailedTraceModules] | None:
|
||||
"""Handle the legacy case where users might provide a comma-separated
|
||||
string instead of a list of strings."""
|
||||
if value is not None and len(value) == 1 and "," in value[0]:
|
||||
value = cast(list[DetailedTraceModules], value[0].split(","))
|
||||
return value
|
||||
|
||||
@model_validator(mode="after")
|
||||
def _validate_tracing_config(self):
|
||||
if self.collect_detailed_traces and not self.otlp_traces_endpoint:
|
||||
|
||||
@@ -10,7 +10,6 @@ import os
|
||||
import sys
|
||||
from collections.abc import Callable
|
||||
from dataclasses import MISSING, asdict, dataclass, fields, is_dataclass
|
||||
from itertools import permutations
|
||||
from types import UnionType
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
@@ -1523,13 +1522,6 @@ class EngineArgs:
|
||||
observability_group.add_argument(
|
||||
"--otlp-traces-endpoint", **observability_kwargs["otlp_traces_endpoint"]
|
||||
)
|
||||
# TODO: generalise this special case
|
||||
choices = observability_kwargs["collect_detailed_traces"]["choices"]
|
||||
metavar = f"{{{','.join(str(c) for c in choices)}}}"
|
||||
observability_kwargs["collect_detailed_traces"]["metavar"] = metavar
|
||||
observability_kwargs["collect_detailed_traces"]["choices"] += [
|
||||
",".join(p) for p in permutations(get_args(DetailedTraceModules), r=2)
|
||||
]
|
||||
observability_group.add_argument(
|
||||
"--collect-detailed-traces",
|
||||
**observability_kwargs["collect_detailed_traces"],
|
||||
|
||||
Reference in New Issue
Block a user