{"record":{"id":"1fb88bab0fe143cc","repo":"keras-team/keras","slug":"unrecognized-format-format-supported-formats-ar","errorCode":null,"errorMessage":"Unrecognized format={format}. Supported formats are: {list(available_formats)}.","messagePattern":"Unrecognized format=(.+?)\\. Supported formats are: (.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/models/model.py","lineNumber":940,"sourceCode":"        loaded_program = torch.export.load(\"path/to/model.pt2\")\n        predictions = loaded_program.module()(input_tensor)\n        ```\n        \"\"\"\n        from keras.src.export import export_litert\n        from keras.src.export import export_onnx\n        from keras.src.export import export_openvino\n        from keras.src.export import export_saved_model\n        from keras.src.export import export_torch\n\n        available_formats = (\n            \"tf_saved_model\",\n            \"onnx\",\n            \"openvino\",\n            \"litert\",\n            \"torch\",\n        )\n        if format not in available_formats:\n            raise ValueError(\n                f\"Unrecognized format={format}. Supported formats are: \"\n                f\"{list(available_formats)}.\"\n            )\n\n        # Check if LiteRT export is available (requires TensorFlow or\n        # PyTorch backend)\n        if format == \"litert\" and backend.backend() not in (\n            \"tensorflow\",\n            \"torch\",\n        ):\n            raise ValueError(\n                \"LiteRT export requires TensorFlow or PyTorch backend.\"\n            )\n\n        # Check if Torch export is available (requires PyTorch backend)\n        if format == \"torch\" and backend.backend() != \"torch\":\n            raise ValueError(\"Torch export requires PyTorch backend.\")\n","sourceCodeStart":922,"sourceCodeEnd":958,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/models/model.py#L922-L958","documentation":"Raised by Model.export when the `format` argument is not one of the supported export backends enumerated in available_formats ('tf_saved_model', 'onnx', 'openvino', 'litert', 'torch'). The dispatch table in the export method has no branch for the given string, so the requested exporter cannot be selected.","triggerScenarios":"Thrown at keras/src/models/model.py:940 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of: \"tf_saved_model\", \"onnx\", \"openvino\", \"litert\", \"torch\"","Fix casing/typos in the format string (lowercase, underscores)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}