question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TensorFlow is not listed as a `setup.py` dependency but is required

See original GitHub issue

Problem you have encountered:

tensorflow is not listed as a dependency in setup.py here: https://github.com/google/flax/blob/35d5d8a4ff466f57bf6af4d0f8c147d472795743/setup.py#L27-L33 but is required by flax here: https://github.com/google/flax/blob/aad0be1e9b20e3a571c9a6d7814bda7a9951ba5c/flax/training/checkpoints.py#L31

What you expected to happen:

tensorflow to be listed as a requirement in setup.py. Or, even better, for there to be no dependence on tensorflow at all since it seems to be only used for tensorflow.io.gfile.

Logs, error messages, etc:

n/a

Steps to reproduce:

n/a

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
levskayacommented, Apr 27, 2022

#2073 is a WIP first draft at removing the TF-dependence for basic IO operations. We can’t shim something that will perform as well as the native gfile io calls, but we can break the dependency so things at least work in most simple use-cases without a TF install.

We would still have an implicit dependence on TF for our metrics/tensorboard.py tensorboard utility though. The tensorboard people finally released a version of tensorboard that can be installed without tensorflow, though they’ve written only a little about what’s supported in this mode of operation. Still, perhaps we can just deprecate our own summary writer util at this point and rely on them for tensorboard metric export.

2reactions
AdityaKane2001commented, Feb 23, 2022

I think what we should do is fall back to using python file API if tensorflow is not installed.

IMHO this should be the default method. One should need tf if and only if GCS is involved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

setup.py: Dependency on tensorflow · Issue #124 - GitHub
I have no idea about specifying conditional dependencies. How about we simply do not require tensorflow in REQUIRED_PACKAGE from setup.py?
Read more >
setup.py doesn't find tensorflow==2.0 dependency (found ...
It used to be the tensorflow==2.0.0b0 version and it worked fine. I just tried to upgrade to the officially released version ( tensorflow==2.0...
Read more >
Build from source - TensorFlow
Additional required dependencies are listed in the setup.py file under REQUIRED_PACKAGES . Install Bazel. To build TensorFlow, you will need to install Bazel....
Read more >
Install TensorFlow with pip
TensorFlow requires a recent version of pip, so upgrade your pip installation to be sure you're running the latest version. Then, install TensorFlow...
Read more >
Build from source on Windows - Install - TensorFlow
Install Python and the TensorFlow package dependencies · Install Bazel · Install MSYS2 · Install Visual C++ Build Tools 2019 · Install GPU...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found