keras-team / autokeras

AutoML library for deep learning
http://autokeras.com/
Apache License 2.0
9.16k stars 1.4k forks source link

Sometimes fit function ends before max_trials is reached, similar for epochs #1713

Open jbrepogmailcom opened 2 years ago

jbrepogmailcom commented 2 years ago

Bug Description

Hello, I have issue with following script. Sometimes the fit function does not perform 100 trials, but ends after less. When it is restarted, then it continues with more trials. Similar goes for epochs. Sometimes epochs do not continue until 40, but end at 12, 22 or similar.

Is it by design or some error?

import numpy as np
import pandas as pd
import tensorflow as tf

import autokeras as ak

# Initialize the structured data classifier.
clf = ak.StructuredDataClassifier(
    overwrite=False, max_trials=100
) 

clf.fit("file.csv","gradient",validation_split=0.2,epochs=40)

# Evaluate the best model with testing data.
print(clf.evaluate("file.csv", "gradient"))

Bug Reproduction

Code for reproducing the bug:

Data used by the code:

Expected Behavior

Setup Details

Include the details about the versions of:

Additional context

jbrepogmailcom commented 2 years ago

After I reached about 100 trials, follow-up runs only do one loop and then stop. Why it does not reach defined max_trials=200?