Skip to content

Import keras_cv fails on current master #2400

@smitlg

Description

@smitlg

Some parts of keras_cv depends on keras_nlp and tensorflow_text. The following errors pops up:

[/usr/local/lib/python3.10/dist-packages/keras_cv/models/feature_extractor/clip/clip_tokenizer.py](https://localhost:8080/#) in <module>
     14 import regex as re
     15 import tensorflow as tf
---> 16 import tensorflow_text as tf_text
     17 
     18 try:

ModuleNotFoundError: No module named 'tensorflow_text'

Fixing this error by pip install tensorflow_text, gives a new error:

[/usr/local/lib/python3.10/dist-packages/keras_cv/models/feature_extractor/clip/clip_tokenizer.py](https://localhost:8080/#) in <module>
    105 
    106 
--> 107 class CLIPTokenizer(BytePairTokenizer):
    108     def __init__(self, **kwargs):
    109         super().__init__(**kwargs)

NameError: name 'BytePairTokenizer' is not defined

This will be only fixed by installing keras_nlp or by the approach used in #2394

Metadata

Metadata

Labels

type:BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions