keras-team / autokeras

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

Bug: 'graph' is referenced before assignment in auto_model.py error #1837

Open 1kuna opened 1 year ago

1kuna commented 1 year ago

Bug Description

When trying to use AutoModel, I get an error saying 'graph' is referenced before assignment in auto_model.py

Bug Reproduction

Code for reproducing the bug: model = AutoModel(inputs=X_train, outputs=y_train)

Data used by the code: Time-series DataFrame from a csv file on X axis, numerical data attached to specific times and dates on Y in a :03d format

Setup Details

Include the details about the versions of:

Additional context

I'm very new to programming so this may be a simple error on my end by other means.

Traceback (most recent call last): File "k:\Creative Cloud Files\python projs\galottery\tensor3.py", line 61, in <module> model = AutoModel(inputs=X_train, outputs=y_train) File "C:\Users\Zach\anaconda3\lib\site-packages\autokeras\auto_model.py", line 140, in __init__ graph = self._build_graph() File "C:\Users\Zach\anaconda3\lib\site-packages\autokeras\auto_model.py", line 207, in _build_graph return graph UnboundLocalError: local variable 'graph' referenced before assignment