-
Notifications
You must be signed in to change notification settings - Fork 425
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
tensorflow should not be listed as dependency in setup.py #546
Comments
Hi @amaiya, Thanks for trying the library! We understand the issue and will look at updating the To install
To install
Finally, to install stellargraph without change to your existing tensorflow libraries:
However, there should be a warning in the latter case if tensorflow is not installed, or an incompatible version of tensorflow is installed. This will help users who install StellarGraph without reading the fine print so they do not face unexplained errors. |
@adocherty Your suggested solution would be great. Thanks to you and your team for a great library - it fills an important gap. |
Hi all, I've tried the installation with |
) With tensorflow 2.1, the `tensorflow` package includes GPU support by default. This seems to be enough to exceed readthedocs's memory limits and cause the build to fail. `tensorflow-cpu` 2.1 does not hit this problem, and so we can fall back to that when building documentation. We probably want to make this more generally configurable (#546), but that's a more intricate problem, and this gets us back to having working documentation. This also switches to only using the dependencies in `setup.py`, as building documentation doesn't need any of the dev dependencies listed in `requirements.txt`. See: #602
@raulqf This was originally a problem due to tensorflow having two different packages with either cpu or gpu support. However, with the latest release of the library v0.9.0, stellargraph now depends on tensorflow 2.0, which has CPU and GPU support in one package, so we've decided it's not worth having the different extra options for @amaiya I considered your original suggestion of the ticket "tensorflow should not be listed as dependency", but eventually decided it had too many downsides (see discussion in #567). I don't think this will be an issue now that tensorflow doesn't require a separate gpu package, but do let us know if you still see it being problematic |
Actually, it looks like I got the wrong impression from the tensorflow installation docs - the release notes indicate that the cpu + gpu in-one-package support only came about during TF 2.1.0 release https://github.com/tensorflow/tensorflow/releases/tag/v2.1.0 Since stellargraph still depends on TF 2.0, this issue still exists until we upgrade to TF 2.1 |
With the move to tensorflow 2.1 in #875, this has now been addressed and will be included in our next release. |
With #1045 done, this should be resolved too |
I am still facing this issue stellar graph is not using GPU, I am working with Watch Your Step Embedding Method. |
Describe the bug
The
stellargraph
library includestensorflow
(i.e.,"tensorflow>=1.14,<1.15"
) as a dependency in setup.py. If a user hastensorflow-gpu
installed, thenpip3 install stellargraph
installstensorflow
, which overwrites things and causes all models to be trained on CPU instead of GPU. To fix, users must remove thetensorflow*
installations and reinstalltensorflow-gpu
. This was true for TF 1.14 at least, and I think may hold true with TF 2.0.To Reproduce
Steps to reproduce the behavior:
On a system where
tensorflow-gpu
is installed, install stellargraph with:pip3 install stellargraph
Expected behavior
Installing
stellargraph
shouldn't corrupt existingtensorflow-gpu
installations.Solution
The
tensorflow
entry should be removed as a dependency insetup.py
and requirements. Instead, the Installation section in thestellargraph
README should include a note about installingtensorflow
(ortensorflow-gpu
) separately when installingstellargraph
. This is how other libraries typically handle it. For instance, see the installation instructions for graph_nets:In
setup.py
of graph_nets:The text was updated successfully, but these errors were encountered: