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

test modue now working on mac #98

Closed
nuri428 opened this issue Aug 18, 2018 · 7 comments
Closed

test modue now working on mac #98

nuri428 opened this issue Aug 18, 2018 · 7 comments

Comments

@nuri428
Copy link

nuri428 commented Aug 18, 2018

from keras.datasets import mnist
from autokeras.image_supervised import ImageClassifier

(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train = x_train.reshape(x_train.shape + (1,))
x_test = x_test.reshape(x_test.shape + (1,))

clf = ImageClassifier(verbose=True)
clf.fit(x_train, y_train, time_limit=12 * 60 * 60)
clf.final_fit(x_train, y_train, x_test, y_test, retrain=True)
y = clf.evaluate(x_test, y_test)
print(y)

Bug Description

Reproducing Steps

Steps to reproduce the behavior:

  • Step 1: ...
  • Step 2: ...

Expected Behavior

Setup Details

Include the details about the versions of:

  • OS type and version: mac high sierra 10.13.6(17G65)
  • Python: 3.6(anaconda)
  • autokeras:
  • scikit-learn: 0.19.1
  • numpy: 1.14.5
  • keras:2.2.2
  • scipy:1.1.0
  • tensorflow: 1.8.0
  • pytorch: not installed

Additional context

@jrenouard
Copy link

jrenouard commented Aug 18, 2018

Hey,
I get pretty much the same issue with the first example on MacOSX 10.12
I installed autokeras via a pip3 install autokerasand my python version is a fresh 3.6 from python.org

When I try to run the very first example I get this error:

Traceback (most recent call last):
  File "autokeras.py", line 1, in <module>
    import autokeras as ak
  File "/Users/julien/travail/python/autokeras.py", line 3, in <module>
    clf = ak.ImageClassifier()
AttributeError: module 'autokeras' has no attribute 'ImageClassifier'

@haifeng-jin
Copy link
Collaborator

@jrenouard
Thank you for your report but we really cannot reproduce the error.
Would you use "python3 -m pip install autokeras" to install, and use "python3" to run the mnist.py?
So that it can make sure the package is installed for the same interpreter you use to run the script.
Thanks.

@abhisingh007224
Copy link

I followed your steps but still getting the same eroor

@albert-92
Copy link

I'm getting the same error AttributeError: module 'autokeras' has no attribute 'ImageClassifier' on Ubuntu 18.04.

On Windows 10 it works just fine.

I tried pip3 install autokeras and python3 -m pip install autokeras.

@abhisingh007224
Copy link

But in Mac it is still showing error

@haifeng-jin
Copy link
Collaborator

hi @albert-92 @abhisingh007224 , I really cannot reproduce this error. Maybe it is related to the conda environment?

Would you please run the following script with the same python interpreter and paste the output here?
Thank you for your help!

import sys
print(sys.version)
import pkg_resources
pkg_resources.get_distribution("autokeras").version
import autokeras
print(autokeras.__dict__)

@lucasbissaro
Copy link

I had this problem and found out that my file was named autokeras.py, so when I imported the lib, I was actually importing my own file. Changing the file name solved the problem.

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

6 participants