tensorflow Install tensorboard as an extra

mwngjboj  于 6个月前  发布在  其他
关注(0)|答案(1)|浏览(43)

问题类型

功能请求

你是否在TF nightly版本中复现了这个bug?

是的

来源

源代码

Tensorflow版本

2.11.0

自定义代码

是的

OS平台和发行版

  • 无响应*

移动设备

  • 无响应*

Python版本

  • 无响应*

Bazel版本

  • 无响应*

GCC/编译器版本

  • 无响应*

CUDA/cuDNN版本

  • 无响应*

GPU型号和内存

  • 无响应*

当前行为?

The `tensorflow` package currently relies on a great deal of sub-dependencies. Among them the biggest one is definitely the tensorboard, as you can see from this tree obtained through `poetry`. I wonder if the `tensorboard` (and possibly other dependencies) are really needed for a minimal installation of tensorflow. E.g. do I really need the tensorboard for running inference on a model? The more dependencies we have
- The more bloated our virtual environments become
- The slower our CI jobs are
- The bigger are our Docker images that run TensorFlow
- The slower is the dependency resolution of Python packages with tools such as poetry, pipenv, pdm, ..

In comparison, `torch` just depends on `typing-extensions`.

It would be great to have a minimal installation of `tensorflow` by default and rely on pip extras to install any satellite functionalities (such as `pip install tensorflow[tensorboard]`).

tensorflow >=2.3.0
    ├── absl-py >=0.4.0
    ├── astunparse >=1.6.0
    │   ├── six >=1.6.1,<2.0
    │   └── wheel >=0.23.0,<1.0
    ├── flatbuffers >=1.12
    ├── gast >=0.2.1
    ├── google-pasta >=0.1.1
    │   └── six * (circular dependency aborted here)
    ├── grpcio >=1.24.3,<2.0
    ├── h5py >=2.9.0
    │   └── numpy >=1.14.5
    ├── keras >=2.8.0rc0,<2.9
    ├── keras-preprocessing >=1.1.1
    │   ├── numpy >=1.9.1 (circular dependency aborted here)
    │   └── six >=1.9.0 (circular dependency aborted here)
    ├── libclang >=9.0.1
    ├── numpy >=1.20 (circular dependency aborted here)
    ├── opt-einsum >=2.3.2
    │   └── numpy >=1.7 (circular dependency aborted here)
    ├── protobuf >=3.9.2
    ├── setuptools *
    ├── six >=1.12.0 (circular dependency aborted here)
    ├── tensorboard >=2.8,<2.9
    │   ├── absl-py >=0.4 (circular dependency aborted here)
    │   ├── google-auth >=1.6.3,<3
    │   │   ├── cachetools >=2.0.0,<6.0
    │   │   ├── pyasn1-modules >=0.2.1
    │   │   │   └── pyasn1 >=0.4.6,<0.5.0
    │   │   ├── rsa >=3.1.4,<5
    │   │   │   └── pyasn1 >=0.1.3 (circular dependency aborted here)
    │   │   └── six >=1.9.0 (circular dependency aborted here)
    │   ├── google-auth-oauthlib >=0.4.1,<0.5
    │   │   ├── google-auth >=1.0.0 (circular dependency aborted here)
    │   │   └── requests-oauthlib >=0.7.0
    │   │       ├── oauthlib >=3.0.0
    │   │       └── requests >=2.0.0
    │   │           ├── certifi >=2017.4.17
    │   │           ├── charset-normalizer >=2,<4
    │   │           ├── idna >=2.5,<4
    │   │           └── urllib3 >=1.21.1,<1.27
    │   ├── grpcio >=1.24.3 (circular dependency aborted here)
    │   ├── markdown >=2.6.8
    │   │   └── importlib-metadata >=4.4
    │   │       └── zipp >=0.5
    │   ├── numpy >=1.12.0 (circular dependency aborted here)
    │   ├── protobuf >=3.6.0 (circular dependency aborted here)
    │   ├── requests >=2.21.0,<3 (circular dependency aborted here)
    │   ├── setuptools >=41.0.0 (circular dependency aborted here)
    │   ├── tensorboard-data-server >=0.6.0,<0.7.0
    │   ├── tensorboard-plugin-wit >=1.6.0
    │   ├── werkzeug >=0.11.15
    │   └── wheel >=0.26 (circular dependency aborted here)
    ├── tensorflow-estimator >=2.8,<2.9
    ├── tensorflow-io-gcs-filesystem >=0.23.1
    ├── termcolor >=1.1.0
    ├── typing-extensions >=3.6.6
    └── wrapt >=1.11.0
### Standalone code to reproduce the issue

```shell
pip install tensorflow
uidvcgyl

uidvcgyl1#

感谢您的特性请求。据我所知,我们没有计划为最小化的TensorFlow版本减少依赖包。
@learning-to-play ,您能查看一下这个请求吗?

相关问题