mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-04 21:30:07 +06:00
Limit Pydantic to V1 in dependencies (#24596)
* Limit Pydantic to V1 in dependencies Pydantic is about to release V2 release which will break a lot of things. This change prevents `transformers` to be used with Pydantic V2 to avoid breaking things. * more --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
299aafe55f
commit
d51aa48a76
@ -50,5 +50,5 @@ RUN DS_BUILD_CPU_ADAM=1 DS_BUILD_FUSED_ADAM=1 DS_BUILD_UTILS=1 python3 -m pip in
|
|||||||
RUN cd transformers && python3 setup.py develop
|
RUN cd transformers && python3 setup.py develop
|
||||||
|
|
||||||
# The base image ships with `pydantic==1.8.2` which is not working - i.e. the next command fails
|
# The base image ships with `pydantic==1.8.2` which is not working - i.e. the next command fails
|
||||||
RUN python3 -m pip install -U --no-cache-dir pydantic
|
RUN python3 -m pip install -U --no-cache-dir pydantic<2
|
||||||
RUN python3 -c "from deepspeed.launcher.runner import main"
|
RUN python3 -c "from deepspeed.launcher.runner import main"
|
||||||
|
2
setup.py
2
setup.py
@ -145,7 +145,7 @@ _deps = [
|
|||||||
"protobuf",
|
"protobuf",
|
||||||
"psutil",
|
"psutil",
|
||||||
"pyyaml>=5.1",
|
"pyyaml>=5.1",
|
||||||
"pydantic",
|
"pydantic<2",
|
||||||
"pytest>=7.2.0",
|
"pytest>=7.2.0",
|
||||||
"pytest-timeout",
|
"pytest-timeout",
|
||||||
"pytest-xdist",
|
"pytest-xdist",
|
||||||
|
@ -50,7 +50,7 @@ deps = {
|
|||||||
"protobuf": "protobuf",
|
"protobuf": "protobuf",
|
||||||
"psutil": "psutil",
|
"psutil": "psutil",
|
||||||
"pyyaml": "pyyaml>=5.1",
|
"pyyaml": "pyyaml>=5.1",
|
||||||
"pydantic": "pydantic",
|
"pydantic": "pydantic<2",
|
||||||
"pytest": "pytest>=7.2.0",
|
"pytest": "pytest>=7.2.0",
|
||||||
"pytest-timeout": "pytest-timeout",
|
"pytest-timeout": "pytest-timeout",
|
||||||
"pytest-xdist": "pytest-xdist",
|
"pytest-xdist": "pytest-xdist",
|
||||||
|
Loading…
Reference in New Issue
Block a user