From 2f3afe9b2c56cca5766f37594b720980697b30e0 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 30 Jun 2023 15:35:23 -0400 Subject: [PATCH] Restrict `pydantic<2.0.0` due to breaking changes > Pydantic V2 is a ground-up rewrite that offers many new features, performance improvements, and some breaking changes compared to Pydantic V1. ``` deepsparse/pipeline.py:822: in class PipelineConfig(BaseModel): ... NameError: Field "model_path" has conflict with protected namespace "model_" ``` --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d457cd1a5c..1afb399614 100644 --- a/setup.py +++ b/setup.py @@ -87,7 +87,7 @@ def _parse_requirements_file(file_path): _deps = [ "numpy>=1.16.3", "onnx>=1.5.0,<1.15.0", - "pydantic>=1.8.2", + "pydantic>=1.8.2,<2.0.0", "requests>=2.0.0", "tqdm>=4.0.0", "protobuf>=3.12.2,<=3.20.1", @@ -120,7 +120,6 @@ def _parse_requirements_file(file_path): _server_deps = [ "uvicorn>=0.15.0", "fastapi>=0.70.0,<0.87.0", - "pydantic>=1.8.2", "requests>=2.26.0", "python-multipart>=0.0.5", "prometheus-client>=0.14.1",