replicate / cog

Containers for machine learning
https://cog.run
Apache License 2.0
8.1k stars 564 forks source link

Downgrade `typing-extensions` to fix conflict with `spacy` and `pydantic` #2033

Closed meatballhat closed 3 weeks ago

meatballhat commented 3 weeks ago

that results in seemingly unrelated errors like:

  File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/spacy/schemas.py", line 250, in <module>
    class TokenPattern(BaseModel):
  File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 661, in pydantic.fields.ModelField._type_analysis
  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "/root/.pyenv/versions/3.8.16/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

Closes PLAT-443