{"record":{"id":"3fddc38d32967365","repo":"keras-team/keras","slug":"backend-add-endpoint-must-be-implemented-in-bac","errorCode":null,"errorMessage":"_backend_add_endpoint() must be implemented in backend subclasses.","messagePattern":"_backend_add_endpoint\\(\\) must be implemented in backend subclasses\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"keras/src/export/saved_model_export_archive.py","lineNumber":158,"sourceCode":"                    \")\"\n                )\n            setattr(self._tf_trackable, name, decorated_fn)\n            self._endpoint_names.append(name)\n            return decorated_fn\n\n        input_signature = tree.map_structure(\n            make_tf_tensor_spec, input_signature\n        )\n        decorated_fn = self._backend_add_endpoint(\n            name, fn, input_signature, **kwargs\n        )\n        self._endpoint_signatures[name] = input_signature\n        setattr(self._tf_trackable, name, decorated_fn)\n        self._endpoint_names.append(name)\n        return decorated_fn\n\n    def _backend_add_endpoint(self, name, fn, input_signature, **kwargs):\n        raise NotImplementedError(\n            \"_backend_add_endpoint() must be implemented in backend subclasses.\"\n        )\n\n    def track_and_add_endpoint(self, name, resource, input_signature, **kwargs):\n        \"\"\"Track the variables and register a new serving endpoint.\n\n        This function combines the functionality of `track` and `add_endpoint`.\n        It tracks the variables of the `resource` (either a layer or a model)\n        and registers a serving endpoint using `resource.__call__`.\n\n        Args:\n            name: `str`. The name of the endpoint.\n            resource: A trackable Keras resource, such as a layer or model.\n            input_signature: Optional. Specifies the shape and dtype of `fn`.\n                Can be a structure of `keras.InputSpec`, `tf.TensorSpec`,\n                `backend.KerasTensor`, or backend tensor (see below for an\n                example showing a `Functional` model with 2 input arguments). If\n                not provided, `fn` must be a `tf.function` that has been called","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/export/saved_model_export_archive.py#L140-L176","documentation":"Error \"_backend_add_endpoint() must be implemented in backend subclasses.\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/export/saved_model_export_archive.py:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}