sgl-project/sglang · error · ValueError

{} must not be None

Error message

{} must not be None

What it means

_select_rank_config_value received None for a required rank-scoped field; the UMBP store constructor requires these fields to be set before rank selection can proceed.

Source

Thrown at python/sglang/srt/mem_cache/storage/umbp/umbp_store.py:111

    return str(value)


def _default_node_address() -> str:
    try:
        return socket.gethostbyname(socket.gethostname())
    except Exception:
        return "127.0.0.1"


def _select_rank_config_value(
    value: Any,
    rank_index: int,
    field_name: str,
    cast_type,
    auto_increment_scalar: bool = False,
):
    if value is None:
        raise ValueError(f"{field_name} must not be None")

    candidates = value
    if isinstance(value, str) and "," in value:
        candidates = [item.strip() for item in value.split(",") if item.strip()]

    if isinstance(candidates, (list, tuple)):
        if not candidates:
            raise ValueError(f"{field_name} must not be empty")
        if rank_index >= len(candidates):
            raise ValueError(
                f"{field_name} has {len(candidates)} entries, but rank_index={rank_index}"
            )
        return cast_type(candidates[rank_index])

    selected = cast_type(candidates)
    if auto_increment_scalar:
        selected = cast_type(selected + rank_index)
    return selected

View on GitHub (pinned to 0132848349)

Solutions

  1. Identify the field name in the message and set it in the store config/extra_config
  2. Check the UMBP store docs for the required fields of the release you run

Example fix

# before
extra = {}  # missing required field, e.g. 'numa_node'
# after
extra = {'numa_node': 0}
Defensive patterns

Strategy: validation

Validate before calling

REQUIRED_UMBP_FIELDS = ['numa_node']  # per release; check error message for the name
missing = [f for f in REQUIRED_UMBP_FIELDS if extra.get(f) is None]
assert not missing, f'missing required extra_config fields: {missing}'

Prevention

When it happens

Trigger: Constructing the UMBP store without a required field (e.g. the numa/rank-related config) — value resolves to None and the field name is reported.

Common situations: Missing key in extra_config or store args when enabling UMBP storage; partial default config after a version upgrade added a new required field.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/4cd36b96983c04f9. Report an issue: GitHub.