tensorflow / skflow

Simplified interface for TensorFlow (mimicking Scikit Learn) for Deep Learning
Apache License 2.0
3.18k stars 439 forks source link

ImportError: cannot import name NotFittedError #47

Closed mrry closed 8 years ago

mrry commented 8 years ago

The import of sklearn.utils.validation.NotFittedError in skflow/estimators/base.py is no longer correct with the latest version if scikit-learn. In particular, this commit to scikit-learn moves NotFittedError to sklearn.exceptions.NotFittedError.

Which versions of scikit-learn is skflow expected to support? (I would send a PR, but am not sure how you want to deal with backwards compatibility here.)

(Source: this StackOverflow question.)

ilblackdragon commented 8 years ago

I think we would want to support 0.16, 0.17 and latest. I'll make sure CI has all of them in coming days. Your contributions are welcome, I'll though send a quick fix for this one.

viksit commented 8 years ago

A simple pip install and running the neural_translation.py example gives me the same error. Thoughts?

terrytangyuan commented 8 years ago

Try this pip install git+git://github.com/tensorflow/skflow.git. It should tell you to update some dependencies.

terrytangyuan commented 8 years ago

@ilblackdragon @mrry I suggest we create a compat.py file to deal with compatibility. We put a bunch of try catch and then import NotFittedError via from compat import NotFittedError. What do you think?