vllm-project/vllm · error · ValueError

log_balancedness_interval must be greater than 0.

Error message

log_balancedness_interval must be greater than 0.

What it means

The final check in EPLBConfig._validate_eplb_config requires log_balancedness_interval > 0 when log_balancedness logging is enabled. The interval is the number of steps between balancedness logs; zero or negative would mean an undefined/invalid logging cadence.

Source

Thrown at vllm/config/parallel.py:114

    - "torch_gloo": Use torch.distributed gloo with CPU staging
    - "nixl": Use NIXL with staged send/recv buffers
    - "pynccl": Use PyNccl send/recv
    - None: Auto-select backend (prefers "nixl", falls back to "torch_gloo")
    """

    @model_validator(mode="after")
    def _validate_eplb_config(self) -> Self:
        if self.use_async and self.policy != "default":
            raise ValueError("Async EPLB is only supported with the default policy.")
        if self.use_async and self.communicator in ("torch_nccl", "pynccl"):
            raise ValueError(
                f"{self.communicator} communicator is incompatible with "
                "async EPLB due to NCCL multi-stream conflicts. Use "
                "'torch_gloo' or 'nixl' instead, or leave communicator "
                "unset for automatic selection."
            )
        if self.log_balancedness and self.log_balancedness_interval <= 0:
            raise ValueError("log_balancedness_interval must be greater than 0.")
        return self


@config
class ParallelConfig:
    """Configuration for the distributed execution."""

    pipeline_parallel_size: int = Field(default=1, ge=1)
    """Number of pipeline parallel groups."""
    tensor_parallel_size: int = Field(default=1, ge=1)
    """Number of tensor parallel groups."""
    prefill_context_parallel_size: int = Field(default=1, ge=1)
    """Number of ranks that split prefill sequence computation. PCP expands
    the process world size but does not increase the KV-cache shard count."""
    data_parallel_size: int = Field(default=1, ge=1)
    """Number of data parallel groups. MoE layers will be sharded according to
    the product of the tensor, prefill-context, and data parallel sizes."""
    data_parallel_size_local: int = Field(default=1, ge=0)

View on GitHub (pinned to c794754062)

Solutions

  1. Set the interval to >= 1 (use 1 for every-step logging).
  2. Or remove --eplb-log-balancedness-interval to fall back to the default positive interval.

Example fix

# before
vllm serve model --enable-eplb --eplb-log-balancedness --eplb-log-balancedness-interval 0

# after
vllm serve model --enable-eplb --eplb-log-balancedness --eplb-log-balancedness-interval 1
Defensive patterns

Strategy: validation

Validate before calling

def check_balancedness_interval(enabled: bool, interval: int) -> None:
    if enabled and interval <= 0:
        raise SystemExit("eplb_log_balancedness_interval must be >= 1")

Prevention

When it happens

Trigger: Passing --eplb-log-balancedness with --eplb-log-balancedness-interval 0 or a negative value (interval defaults to a positive number, so this usually means it was explicitly set).

Common situations: Trying to log every step by setting 0 instead of 1; scripted sweeps that iterate interval values including 0.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/225489054ec3c5db. Report an issue: GitHub.