New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: ValueError: The dataset should at least contain 2 batches to be split. #1871
Comments
Hi, Not sure if you're still encountering this issue. I tried checking out your dataset, but couldn't access it. Are there enough samples in data? Another option if working with small sample sizes is to decrease batch_size significantly in the fit method. Hope this helps. |
- Problem: I get this error if the dataset has 41 or fewer rows. There is no error when the data set is 42 or higher! - Fix: The Following change in batch_size fixes this problem: default is 32 - Details: Autokeras 1.1, Code, and passing/failing data sets are attached. codeurl = 'auto-insurance_41a.csv' split into input and output elementsdata = dataframe.values separate into train and test setsX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1) codeerrorReloading Tuner from ./structured_data_regressor/tuner0.json ValueError Traceback (most recent call last) in <cell line: 11>() 2 frames /usr/local/lib/python3.10/dist-packages/autokeras/tasks/structured_data.py in fit(self, x, y, epochs, callbacks, validation_split, validation_data, **kwargs) /usr/local/lib/python3.10/dist-packages/autokeras/auto_model.py in fit(self, x, y, batch_size, epochs, callbacks, validation_split, validation_data, verbose, **kwargs) /usr/local/lib/python3.10/dist-packages/autokeras/utils/data_utils.py in split_dataset(dataset, validation_split) ValueError: The dataset should at least contain 2 batches to be split. Error |
Hi, I'm just starting with Autokeras, trying out the tutorial example with my dataset but Autokeras doesn't even start. I get this error:
ValueError: The dataset should at least contain 2 batches to be split.
Python 3.10.7, Autokeras 1.1.0, Keras 2.12.0, Tensorflow 2.12.0, Pandas 1.5.3, Numpy 1.23.5
Here's the whole code including link to download the dataset.
The text was updated successfully, but these errors were encountered: