#1944·autokeras

Bug: Getting NotImplemented error for AutoModel fit

Author: HarshithMjhCreated Mar 31, 2025Updated Jul 30, 2025
Labelsbug report

Bug Description

Hi, I am trying to to use AutoModel with custom validation data. The trials are running properly. At the end of all trials, it reaches the code https://github.com/keras-team/autokeras/blob/db78b445ee3aa3aedb19a71d2d1e330cc87f12b3/autokeras/engine/tuner.py#L243 Here, I am facing NotImplemented error. I tried using the export_model() and then save with filename parameter. That also gave NotImplemented error.

I saw that the way of getting the model is different for validation_split vs validation_data in the codeblock mentioned above. So, others might not have faced it yet.

Attached reproducible collab link: https://colab.research.google.com/drive/1AQXss_F7L02y3akhJKji2SdmvJxVhnV0?usp=sharing

So, please help with a way where fit completes properly with proper saving. Because, without having the model saved, the whole training will go waste.

Bug Reproduction

Code for reproducing the bug: https://colab.research.google.com/drive/1AQXss_F7L02y3akhJKji2SdmvJxVhnV0?usp=sharing

Data used by the code:

Expected Behavior

AutoModel fir should complete properly even when custom validation data is provided

Setup Details

Include the details about the versions of:

  • OS type and version:
  • Python:
  • autokeras:
  • keras-tuner:
  • scikit-learn:
  • numpy:
  • pandas:
  • tensorflow:

Additional context