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

module 'autokeras' has no attribute 'StructuredDataClassifier' #1926

Open
m-alshehri opened this issue Aug 9, 2024 · 3 comments
Open

module 'autokeras' has no attribute 'StructuredDataClassifier' #1926

m-alshehri opened this issue Aug 9, 2024 · 3 comments

Comments

@m-alshehri
Copy link

m-alshehri commented Aug 9, 2024

I'm trying to get Autokeras work on categorial data classification task on Google Colab

import autokeras as ak
clf = ak.StructuredDataClassifier(max_trials=10)
clf.fit(X_train, y_train, epochs=5)
    
loss, accuracy = clf.evaluate(X_test, y_test)
print(f"Test Accuracy: {accuracy}")

but the module 'autokeras' has no attribute 'StructuredDataClassifier' keeps appearing. The attribute is no longer within the module so anyone with any workaround?

Autokeras 2.0.0
Python 3.10.12

Thanks

@m-alshehri m-alshehri changed the title AttributeError: module 'autokeras' has no attribute 'StructuredDataClassifier'Bug: AttributeError: module 'autokeras' has no attribute 'StructuredDataClassifier' Aug 9, 2024
@m-alshehri m-alshehri changed the title AttributeError: module 'autokeras' has no attribute 'StructuredDataClassifier' module 'autokeras' has no attribute 'StructuredDataClassifier' Aug 9, 2024
@lpatel29
Copy link

I am facing the same issue. Can anyone please tell me how to solve this?

@johnnymosby
Copy link

StructuredDataClassifier was removed as a public API in version 2.0.0.

@Humbulani1234
Copy link

The following are the instructions I followed to get Structured Data to work

  • Set up your virtual environment using python3.10.x

  • Go to AutoKeras source code repository and download the version==1.0.19 tar package from Tags icon.

  • Enter the AutoKeras source main directory, open the file setup.py and edit the the section install_requires to:

"packaging"
"tensorflow==2.15.1"
"keras==2.15.0"
"pandas"
  • Then build the .whl package using python -m build and its associated dependencies

  • Inside the created dist directory run pip install <>.whl to install AutoKeras and its dependencies

  • Enter examples directory and execute maybe the wine or titanic files.

  • You might encounter a protobuf version compatibility error, I chose to follow instructions (thou at a performance cost) of setting the environment variable: PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

  • The above worked for me, on an UBUNTU MACHINE

To try

  • Get GPU Tensorflow
  • Resolve protobuf dependency.
  • I had also tried to re-integrate StructuredData into the latest codebase, but I'm still encountering errors.

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

No branches or pull requests

4 participants