keras-team/keras · error · NotImplementedError

`add_endpoint` is not implemented in the numpy backend.

Error message

`add_endpoint` is not implemented in the numpy backend.

What it means

NotImplementedError from NumpyExportArchive.add_endpoint: registering a named serving endpoint (function + input signature) is unimplemented in the NumPy backend. The class intentionally stubs the ExportArchive API, so any add_endpoint call under this backend raises immediately.

Solutions

  1. Switch to the TensorFlow backend and use keras.export.ExportArchive to add serving endpoints
  2. Serialize NumPy-backend models manually (e.g. np.save of weights plus custom loader code)
  3. Guard export code paths so they only run when backend() != "numpy"
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at keras/src/backend/numpy/export.py:8 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25). Data as JSON: /api/errors/a739581ccd2557d9. Report an issue: GitHub.

Appendix: source

Thrown at keras/src/backend/numpy/export.py:8

class NumpyExportArchive:
    def track(self, resource):
        raise NotImplementedError(
            "`track` is not implemented in the numpy backend."
        )

    def add_endpoint(self, name, fn, input_signature=None, **kwargs):
        raise NotImplementedError(
            "`add_endpoint` is not implemented in the numpy backend."
        )

View on GitHub (pinned to 7a34a03db6)