sglang: Pydantic>2 causes issues loading models

Hi,

Related to this issue,

By default, since the pydantic version is not pinned, greater than version 2 is used which is causing issues with loading.

However pip install pydantic==1.10.14 resolves this issue and I can load models normally now.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

I tried using the outlines feature and I think someone (either outlines themselves or sglang) needs to add a datasets dependency. Just doing a simple

pip install "sglang[all]"

And then trying to do the regex constrained decoding triggered a failure. Installing datasets fixed it.

Yes I got this issue too. I probably should firstly upgrade to Pydantic v2 (I was waiting for the outlines integration…)

Failed to import transformers.generation.utils because of the following error (look up to see its traceback): 'FieldInfo' object has no attribute 'required'

I’m aware of this issue and plan to upgrade to pydantic 2.0 in these days.