Skip to content
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

Import-level bug: cannot import name 'utils' from 'autokeras.utils #1867

Open
dlmolloy97 opened this issue Mar 24, 2023 · 1 comment
Open

Comments

@dlmolloy97
Copy link

Importing AutoKeras version 1.1.0 produces the following error. This is a blocking issue, as autokeras consequently cannot be imported or used at all.


ImportError Traceback (most recent call last)
Cell In[2], line 2
1 from automl_extension.models.Base import Base
----> 2 from automl_extension.models.AKModel import AKModel
3 from mlflow.keras import autolog
5 #autolog()

File ~\Documents\Repositories\automl_extension\automl_extension\models\AKModel.py:6
4 from random import sample
5 from automl_extension.models.Base import Base
----> 6 import autokeras as ak
7 from sklearn.model_selection import train_test_split
8 import numpy as np

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras_init_.py:17
1 # Copyright 2020 The AutoKeras Authors.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 import keras_nlp
---> 17 from autokeras.auto_model import AutoModel
18 from autokeras.blocks import BertBlock
19 from autokeras.blocks import CategoricalToNumerical

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras\auto_model.py:26
23 from tensorflow import keras
24 from tensorflow import nest
---> 26 from autokeras import blocks
27 from autokeras import graph as graph_module
28 from autokeras import pipeline

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras\blocks_init_.py:18
15 import tensorflow as tf
16 from tensorflow import keras
---> 18 from autokeras.blocks.basic import BertBlock
19 from autokeras.blocks.basic import ConvBlock
20 from autokeras.blocks.basic import DenseBlock

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras\blocks\basic.py:26
23 from tensorflow.keras import applications
24 from tensorflow.keras import layers
---> 26 from autokeras.blocks import reduction
27 from autokeras.engine import block as block_module
28 from autokeras.utils import io_utils

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras\blocks\reduction.py:21
18 from tensorflow import nest
19 from tensorflow.keras import layers
---> 21 from autokeras.engine import block as block_module
22 from autokeras.utils import layer_utils
23 from autokeras.utils import utils

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras\engine\block.py:17
1 # Copyright 2020 The AutoKeras Authors.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from tensorflow import nest
---> 17 from autokeras.engine import named_hypermodel
18 from autokeras.engine import node as node_module
21 class Block(named_hypermodel.NamedHyperModel):

File ~\Anaconda3\envs\automl_extension\lib\site-packages\autokeras\engine\named_hypermodel.py:19
16 from tensorflow import keras
18 from autokeras.engine import serializable
---> 19 from autokeras.utils import utils
22 class NamedHyperModel(keras_tuner.HyperModel, serializable.Serializable):
23 """
24
25 # Arguments
26 name: String. The name of the HyperModel. If unspecified, it will be set
27 automatically with the class name.
28 """

ImportError: cannot import name 'utils' from 'autokeras.utils'

@haifeng-jin
Copy link
Collaborator

I cannot reproduce the issue.
Is it reproducable in colab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants