{"record":{"id":"a86b298e09b522a8","repo":"sgl-project/sglang","slug":"the-option-string-option-is-not-yet-implemented","errorCode":null,"errorMessage":"The {option_string} option is not yet implemented","messagePattern":"The (.+?) option is not yet implemented","errorType":"console","errorClass":"NotImplementedError","httpStatus":null,"severity":"warning","filePath":"python/sglang/multimodal_gen/runtime/entrypoints/cli/utils.py","lineNumber":19,"sourceCode":"# Copied and adapted from: https://github.com/hao-ai-lab/FastVideo\n\n# SPDX-License-Identifier: Apache-2.0\n\nimport argparse\nimport os\nimport shlex\nimport subprocess\nimport sys\n\nfrom sglang.multimodal_gen.runtime.utils.logging_utils import init_logger\n\nlogger = init_logger(__name__)\n\n\nclass RaiseNotImplementedAction(argparse.Action):\n\n    def __call__(self, parser, namespace, values, option_string=None):\n        raise NotImplementedError(f\"The {option_string} option is not yet implemented\")\n\n\ndef launch_distributed(\n    num_gpus: int, args: list[str], master_port: int | None = None\n) -> int:\n    \"\"\"\n    Launch a distributed job with the given arguments\n\n    Args:\n        num_gpus: Number of GPUs to use\n        args: Arguments to pass to v1_sgl_diffusion_inference.py (defaults to sys.argv[1:])\n        master_port: Port for the master process (default: random)\n    \"\"\"\n\n    current_env = os.environ.copy()\n    python_executable = sys.executable\n    project_root = os.path.abspath(\n        os.path.join(os.path.dirname(__file__), \"../../../..\")","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/entrypoints/cli/utils.py#L1-L37","documentation":"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.","triggerScenarios":"Passing a placeholder flag on the command line, e.g. `sglang ... --some-planned-option value`, where the parser registered that option with action=RaiseNotImplementedAction.","commonSituations":"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.","solutions":["Remove the option from your command line","Check --help output or the parser registration in python/sglang/multimodal_gen/runtime/entrypoints/cli/ to see which options are stubs in this version","Upgrade (or pin) to a version where the option is actually implemented"],"exampleFix":"# before\nsglang generate --some-future-option 1 ...\n\n# after\nsglang generate ...","handlingStrategy":"validation","validationCode":"# inspect registered stub options before building the command\nimport subprocess\nhelp_text = subprocess.run([\"sglang\", \"generate\", \"--help\"], capture_output=True, text=True).stdout","typeGuard":null,"tryCatchPattern":"try:\n    run_cli(cmd)\nexcept NotImplementedError as e:\n    if \"not yet implemented\" in str(e):\n        cmd.remove_option(e.option_string)  # drop the stub flag and retry\n    raise","preventionTips":["Only use options confirmed by --help for your installed version","Pin the library version your scripts were written against","Drop placeholder flags copied from future-version docs"],"tags":["cli","not-implemented","argparse"],"backgroundTag":"unsupported-cli-option","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}