text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

ImportError: cannot import name 'builder' from 'google.protobuf.internal'

Open TruthSearchers opened this issue 1 year ago • 0 comments

Describe the bug

Traceback (most recent call last): File "/content/drive/text-generation-webui/modules/text_generation.py", line 261, in generate_reply_HF yield get_reply_from_output_ids(output, input_ids, original_question, state) File "/content/drive/text-generation-webui/modules/text_generation.py", line 103, in get_reply_from_output_ids reply = decode(output_ids[-new_tokens:], state['skip_special_tokens']) File "/content/drive/text-generation-webui/modules/text_generation.py", line 63, in decode return shared.tokenizer.decode(output_ids, skip_special_tokens) File "/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py", line 3484, in decode token_ids = to_py_obj(token_ids) File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 190, in to_py_obj elif is_tf_tensor(obj): File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 166, in is_tf_tensor return False if not is_tf_available() else _is_tensorflow(x) File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 157, in _is_tensorflow import tensorflow as tf File "/usr/local/lib/python3.10/dist-packages/tensorflow/init.py", line 37, in from tensorflow.python.tools import module_util as _module_util File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/init.py", line 37, in from tensorflow.python.eager import context File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/context.py", line 28, in from tensorflow.core.framework import function_pb2 File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/function_pb2.py", line 5, in from google.protobuf.internal import builder as _builder ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/init.py) Output generated in 5.98 seconds (0.17 tokens/s, 1 tokens, context 569, seed 1910894918)

Hey there i am facing this error on latest version of commit few hours ago it was working fine

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

Run the webui and write text to it

Screenshot

No response

Logs

Traceback (most recent call last):
  File "/content/drive/text-generation-webui/modules/text_generation.py", line 261, in generate_reply_HF
    yield get_reply_from_output_ids(output, input_ids, original_question, state)
  File "/content/drive/text-generation-webui/modules/text_generation.py", line 103, in get_reply_from_output_ids
    reply = decode(output_ids[-new_tokens:], state['skip_special_tokens'])
  File "/content/drive/text-generation-webui/modules/text_generation.py", line 63, in decode
    return shared.tokenizer.decode(output_ids, skip_special_tokens)
  File "/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py", line 3484, in decode
    token_ids = to_py_obj(token_ids)
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 190, in to_py_obj
    elif is_tf_tensor(obj):
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 166, in is_tf_tensor
    return False if not is_tf_available() else _is_tensorflow(x)
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 157, in _is_tensorflow
    import tensorflow as tf
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/__init__.py", line 37, in <module>
    from tensorflow.python.eager import context
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/context.py", line 28, in <module>
    from tensorflow.core.framework import function_pb2
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/function_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/__init__.py)

System Info

Google colab

TruthSearchers avatar May 08 '23 09:05 TruthSearchers