Giter Site home page Giter Site logo

Comments (2)

benimran0 avatar benimran0 commented on May 19, 2024 1

Hello, you can just downgrade the protobuf's version.
pip install protobuf==3.20.0

from sodaverse.

JHenzi avatar JHenzi commented on May 19, 2024

Sorry, here's the full error:

Welcome to SODAverse!
Loading COSMO-xl...
Traceback (most recent call last):
  File "/Users/joe/Local Development/sodaverse/chat_with_cosmo.py", line 91, in <module>
    main()
  File "/Users/joe/Local Development/sodaverse/chat_with_cosmo.py", line 87, in main
    cosmo = CosmoAgent()
  File "/Users/joe/Local Development/sodaverse/chat_with_cosmo.py", line 12, in __init__
    self.tokenizer = AutoTokenizer.from_pretrained("allenai/cosmo-xl")
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 676, in from_pretrained
    return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1804, in from_pretrained
    return cls._from_pretrained(
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1959, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 133, in __init__
    super().__init__(
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/tokenization_utils_fast.py", line 114, in __init__
    fast_tokenizer = convert_slow_tokenizer(slow_tokenizer)
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/convert_slow_tokenizer.py", line 1162, in convert_slow_tokenizer
    return converter_class(transformer_tokenizer).converted()
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/convert_slow_tokenizer.py", line 438, in __init__
    from .utils import sentencepiece_model_pb2 as model_pb2
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/transformers/utils/sentencepiece_model_pb2.py", line 92, in <module>
    _descriptor.EnumValueDescriptor(
  File "/Users/joe/Local Development/sodaverse/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 755, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

from sodaverse.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.