{"record":{"id":"999a2cc4573afba5","repo":"hpcaitech/Open-Sora","slug":"unknown-plugin-plugin","errorCode":null,"errorMessage":"Unknown plugin {plugin}","messagePattern":"Unknown plugin (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"opensora/utils/train.py","lineNumber":127,"sourceCode":"        plugin_kwargs[\"find_unused_parameters\"] = True\n        reduce_bucket_size_in_m = plugin_kwargs.pop(\"reduce_bucket_size_in_m\")\n        if \"zero_bucket_size_in_m\" not in plugin_kwargs:\n            plugin_kwargs[\"zero_bucket_size_in_m\"] = reduce_bucket_size_in_m\n        plugin_kwargs.pop(\"cast_inputs\")\n        plugin_kwargs[\"enable_metadata_cache\"] = False\n\n        custom_policy = plugin_kwargs.pop(\"custom_policy\", None)\n        if custom_policy is not None:\n            custom_policy = custom_policy()\n        plugin = HybridParallelPlugin(\n            custom_policy=custom_policy,\n            **plugin_kwargs,\n        )\n        set_tensor_parallel_group(plugin.tp_group)\n        set_sequence_parallel_group(plugin.sp_group)\n        set_data_parallel_group(plugin.dp_group)\n    else:\n        raise ValueError(f\"Unknown plugin {plugin}\")\n    return plugin\n\n\n@torch.no_grad()\ndef update_ema(\n    ema_model: torch.nn.Module, model: torch.nn.Module, optimizer=None, decay: float = 0.9999, sharded: bool = True\n):\n    \"\"\"\n    Step the EMA model towards the current model.\n\n    Args:\n        ema_model (torch.nn.Module): The EMA model.\n        model (torch.nn.Module): The current model.\n        optimizer (torch.optim.Optimizer): The optimizer.\n        decay (float): The decay rate.\n        sharded (bool): Whether the model is sharded.\n    \"\"\"\n    ema_params = OrderedDict(ema_model.named_parameters())","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/hpcaitech/Open-Sora/blob/7ad6a96a135feb81f755c84fb391818718f6beb2/opensora/utils/train.py#L109-L145","documentation":"This ValueError is raised by create_colossalai_plugin in opensora/utils/train.py when the plugin string in the training config is not one of the recognized colossalai plugin names (the if/elif chain over names like 'ddp', 'gemini', 'hybrid_parallel', etc., falling to the else). It exists to fail fast when building the distributed training plugin, before booster initialization.","triggerScenarios":"Setting plugin: \"zero2\"/\"zero3\"/\"fsdp\"/\"deepspeed\" (or any typo like \"ddp \", \"DDP\") in the training config read by create_colossalai_plugin. Called from get_booster and main when setting up the colossalai booster for distributed training.","commonSituations":"Coming from DeepSpeed/FSDP and using their plugin names in an OpenSora config; version upgrades where supported plugin names changed; typos or case errors in YAML config keys.","solutions":["Use a plugin name the function actually supports — check the if/elif conditions in opensora/utils/train.py (e.g. \"ddp\" for plain distributed, or the gemini/hybrid parallel variants)","Match the exact spelling and case; strip stray whitespace/quotes from the config value","If you need ZeRO-style sharding, verify which colossalai plugin provides it in your installed colossalai version and use that name, or update OpenSora to a version supporting it"],"exampleFix":"# before\nplugin_cfg = {\"plugin\": \"deepspeed\"}\n\n# after\nplugin_cfg = {\"plugin\": \"ddp\"}  # or a colossalai-supported name from create_colossalai_plugin","handlingStrategy":"validation","validationCode":"import inspect, opensora.utils.train as t\nsrc = inspect.getsource(t.create_colossalai_plugin)\n# simplest: whitelist the names you know are supported for your version\nsupported = {\"ddp\", \"gemini\", \"hybrid_parallel\"}\nname = cfg.get(\"plugin\", \"ddp\")\nassert name in supported, f\"plugin must be one of {supported}, got {name!r}\"","typeGuard":"def is_supported_plugin(name: str) -> bool:\n    return name in {\"ddp\", \"gemini\", \"hybrid_parallel\"}  # verify against your version","tryCatchPattern":"try:\n    plugin = create_colossalai_plugin(**plugin_cfg)\nexcept ValueError:\n    plugin_cfg[\"plugin\"] = \"ddp\"  # fall back to plain DDP\n    plugin = create_colossalai_plugin(**plugin_cfg)","preventionTips":["Read create_colossalai_plugin in your installed version to learn valid plugin names","DeepSpeed/FSDP-style names are not colossalai plugin names; don't copy them into configs","Pin the OpenSora + colossalai versions you validated your config against"],"tags":["colossalai","distributed-training","config","valueerror","opensora"],"backgroundTag":"unknown-distributed-plugin","analyzedSha":"7ad6a96a135feb81f755c84fb391818718f6beb2","analyzedAt":"2026-08-28T16:58:37.171Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}