-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Milestone
Description
Bug Description
Getting file in timeseries_forecaster.py causes EOFError.
Bug Reproduction
Code for reproducing the bug:
autokeras/docs/py/timeseries_forecaster.py
Lines 20 to 25 in af9168f
| dataset = tf.keras.utils.get_file( | |
| fname="AirQualityUCI.csv", | |
| origin="https://archive.ics.uci.edu/ml/machine-learning-databases/00360/" | |
| "AirQualityUCI.zip", | |
| extract=True, | |
| ) |
Data used by the code:
https://archive.ics.uci.edu/ml/machine-learning-databases/00360/AirQualityUCI.zip
Expected Behavior
The dataset file could be downloaded and extracted successfully.
Setup Details
Include the details about the versions of:
- OS type and version: Ubuntu 20.04
- Python: 3.8
- autokeras: 1.0.19
- keras-tuner: 1.1.2
- scikit-learn: 1.1.1
- numpy: 1.21.2
- pandas: 1.4.1
- tensorflow: 2.9.1
This problem also occurrs in Colab.
Additional context
Colab output:
Downloading data from https://archive.ics.uci.edu/ml/machine-learning-databases/00360/AirQualityUCI.zip
1548288/1543989 [==============================] - 0s 0us/step
1556480/1543989 [==============================] - 0s 0us/step
---------------------------------------------------------------------------
EOFError Traceback (most recent call last)
[<ipython-input-3-72719048ad2d>](https://localhost:8080/#) in <module>()
3 origin="https://archive.ics.uci.edu/ml/machine-learning-databases/00360/"
4 "AirQualityUCI.zip",
----> 5 extract=True,
6 )
7
7 frames
[/usr/lib/python3.7/zipfile.py](https://localhost:8080/#) in _read2(self, n)
1031 self._compress_left -= len(data)
1032 if not data:
-> 1033 raise EOFError
1034
1035 if self._decrypter is not None:
EOFError:
I could confirm this is not due to incomplete file download. Besides, when I change the fname argument from AirQualityUCI.csv to AirQualityUCI.zip, I could see this zip file and the two extracted files in the Keras cache dir, including AirQualityUCI.csv.