{"record":{"id":"bd4b0f88bbaff682","repo":"sgl-project/sglang","slug":"verification-failed-for-failed-fields-n","errorCode":null,"errorMessage":"{} verification failed for {}: Failed fields: {}\\nDetails: {}","messagePattern":"(.+?) verification failed for (.+?): Failed fields: (.+?)\\\\nDetails: (.+?)","errorType":"validation","errorClass":"StageVerificationError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/base.py","lineNumber":340,"sourceCode":"\n        Args:\n            verification_result: Results from verify_input or verify_output\n            stage_name: Name of the current stage\n            verification_type: \"input\" or \"output\"\n        \"\"\"\n        if not verification_result.is_valid():\n            failed_fields = verification_result.get_failed_fields()\n            if failed_fields:\n                # Get detailed failure information\n                detailed_summary = verification_result.get_failure_summary()\n\n                failed_fields_str = \", \".join(failed_fields)\n                error_msg = (\n                    f\"{verification_type.capitalize()} verification failed for {stage_name}: \"\n                    f\"Failed fields: {failed_fields_str}\\n\"\n                    f\"Details: {detailed_summary}\"\n                )\n                raise StageVerificationError(error_msg)\n\n    @property\n    def device(self) -> torch.device:\n        \"\"\"Get the device for this stage.\"\"\"\n        return torch.device(\n            current_platform.device_type,\n        )\n\n    def set_logging(self, enable: bool):\n        \"\"\"\n        Enable or disable logging for this stage.\n\n        Args:\n            enable: Whether to enable logging.\n        \"\"\"\n        self._enable_logging = enable\n\n    def __call__(","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/base.py#L322-L358","documentation":"StageVerificationError raised by Stage._run_verification when pre/post stage input/output verification detects fields failing validation; it lists the failed fields plus a detailed per-field summary. Runs automatically inside Stage.__call__.","triggerScenarios":"A stage whose declared input/output schema fields fail type/shape/content verification when the stage is invoked in the pipeline.","commonSituations":"Pipeline wiring changes pass a tensor of wrong dtype/shape; a stage's verification config drifts from what upstream stages emit; version upgrade tightening verification rules.","solutions":["Read the Failed fields/Details in the message to identify the offending field","Fix the upstream producer or the stage's verification spec so they agree","Temporarily relax verification config for debugging, then re-enable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"null","typeGuard":null,"tryCatchPattern":"try:\n    out = stage(inp)\nexcept StageVerificationError as e:\n    log_verification_failure(stage.name, e); raise","preventionTips":["Run single-stage smoke tests with representative tensors in CI","Keep verification field specs in sync with producer stage outputs"],"tags":["stage","verification","schema-validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}