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

Remove tensorflow as dependency #860

Merged
merged 8 commits into from
Dec 28, 2019
Merged

Remove tensorflow as dependency #860

merged 8 commits into from
Dec 28, 2019

Conversation

gabrieldemarmiesse
Copy link
Contributor

Which issue(s) does this Pull Request fix?

resolves #846

Details of the Pull Request

Tensorflow comes now into two packages: tensorflow and tensorflow-cpu. By including either one or the other in the setup.py's requirements, we force the install on the user's machine.

Since we don't know which one the user wants, we should refuse to install any. To prevent the use of outdated tensorflow packages, we can add a check when users use autokeras for the first time.

This is similar to keras-team/keras-tuner#177 but with an additional check at import time for the tensorflow version.

Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Version checking is a good idea.

I am not sure whether we should let the users install tensorflow themselves. The best way would be if we don't install tensorflow only when tensorflow or tensorflow-gpu is already installed. Not sure if this can be done with pip.

This PR can still be merged since kerastuner is still forcing the installation of tensorflow.
So this PR won't make a difference for now except for the version checking.

@haifeng-jin haifeng-jin merged commit e3f9bfc into keras-team:master Dec 28, 2019
@omalleyt12
Copy link

@gabrieldemarmiesse Would you be willing to add a similar change / error message for keras-tuner? I just released a minor kerastuner version (1.0.1) w/o this dependency but haven't updated GH yet, and a check like this would be nice

@gabrieldemarmiesse
Copy link
Contributor Author

Sure thing. It's easy enough. I'll do it tonight/tomorrow.

@omalleyt12
Copy link

Great, thanks! No rush

abgese pushed a commit that referenced this pull request Jan 12, 2020
* Removed tensorflow as a dependency.

* Moved the check in a function.

* Added packaging as a dependency.

* Formatted the message better.

* Install tensorflow in the CI.

* Fixed the version number in the CI

* Update setup.py

* Update .travis.yml

Co-authored-by: Haifeng Jin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

installation issue o
3 participants