Skip to content

KerasHub has mandatory dependency on tensorflow-text but it isn't mandatory #2101

@jamesmyatt

Description

@jamesmyatt

Can tensorflow-text be removed as a mandatory dependency, please? e.g. move it to an optional dependency group, e.g. "nlp"

As far as I can tell, this dependency makes it impossible to either:

  • have a tensorflow-free environment
  • install KerasHub at all on Windows

Both of these seem to be contrary to Keras 3's mission, especially if you only want the CV parts of KerasHub.

Furthermore, the NoTensorflow integration tests show that it's acceptable to manually uninstall tensorflow and tensorflow-text after installing keras-hub. But it's not possible to never install them in the first place.

I think this was tolerable when this package was KerasNLP (e.g. #1585, keras-team/keras#19542), but now that it's KerasHub, it's a serious issue.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions