sgl-project/sglang · warning · NotImplementedError

The {option_string} option is not yet implemented

Error message

The {option_string} option is not yet implemented

What it means

Raised by RaiseNotImplementedAction, an argparse Action attached to CLI options that are declared but not implemented yet. Using the option at all — even with a value — immediately raises NotImplementedError naming the option string.

Source

Thrown at python/sglang/multimodal_gen/runtime/entrypoints/cli/utils.py:19

# Copied and adapted from: https://github.com/hao-ai-lab/FastVideo

# SPDX-License-Identifier: Apache-2.0

import argparse
import os
import shlex
import subprocess
import sys

from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger

logger = init_logger(__name__)


class RaiseNotImplementedAction(argparse.Action):

    def __call__(self, parser, namespace, values, option_string=None):
        raise NotImplementedError(f"The {option_string} option is not yet implemented")


def launch_distributed(
    num_gpus: int, args: list[str], master_port: int | None = None
) -> int:
    """
    Launch a distributed job with the given arguments

    Args:
        num_gpus: Number of GPUs to use
        args: Arguments to pass to v1_sgl_diffusion_inference.py (defaults to sys.argv[1:])
        master_port: Port for the master process (default: random)
    """

    current_env = os.environ.copy()
    python_executable = sys.executable
    project_root = os.path.abspath(
        os.path.join(os.path.dirname(__file__), "../../../..")

View on GitHub (pinned to 0132848349)

Solutions

  1. Remove the option from your command line
  2. Check --help output or the parser registration in python/sglang/multimodal_gen/runtime/entrypoints/cli/ to see which options are stubs in this version
  3. Upgrade (or pin) to a version where the option is actually implemented

Example fix

# before
sglang generate --some-future-option 1 ...

# after
sglang generate ...
Defensive patterns

Strategy: validation

Validate before calling

# inspect registered stub options before building the command
import subprocess
help_text = subprocess.run(["sglang", "generate", "--help"], capture_output=True, text=True).stdout

Try / catch

try:
    run_cli(cmd)
except NotImplementedError as e:
    if "not yet implemented" in str(e):
        cmd.remove_option(e.option_string)  # drop the stub flag and retry
    raise

Prevention

When it happens

Trigger: Passing a placeholder flag on the command line, e.g. `sglang ... --some-planned-option value`, where the parser registered that option with action=RaiseNotImplementedAction.

Common situations: Copy-pasting command lines from docs, examples, or other tools' versions that reference options this build hasn't implemented; upgrading/downgrading versions where an option regressed to a stub.

Related errors


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