keras-team/autokeras

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

1kuna opened this issue · 0 comments

1kuna commented

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:

  • OS type and version: Windows 11
  • Python: 3.9.13 (conda)
  • autokeras: 1.0.20
  • keras-tuner: 1.1.3
  • scikit-learn: 1.0.2
  • numpy: 1.24.1
  • pandas: 1.5.3
  • tensorflow: 2.11.0

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