pydantic errors on new install
I cleaned-up my environment, and then re-installed it. I see that lightning was upgraded to 2.0.6, pydantic is pinned to 1.10.x. I get the following error:
$ ptbench datamodule list
Traceback (most recent call last):
File "/Users/andre/mamba/envs/ptbench/bin/ptbench", line 5, in <module>
from ptbench.scripts.cli import cli
File "/Users/andre/work/biosignal/software/ptbench/src/ptbench/scripts/cli.py", line 9, in <module>
from . import (
File "/Users/andre/work/biosignal/software/ptbench/src/ptbench/scripts/evaluate.py", line 16, in <module>
from ..data.datamodule import CachingDataModule
File "/Users/andre/work/biosignal/software/ptbench/src/ptbench/data/datamodule.py", line 13, in <module>
import lightning
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/lightning/__init__.py", line 18, in <module>
from lightning.app import storage # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/lightning/app/__init__.py", line 24, in <module>
from lightning.app import components # noqa: E402, F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/lightning/app/components/__init__.py", line 1, in <module>
from lightning.app.components.database.client import DatabaseClient
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/lightning/app/components/database/__init__.py", line 1, in <module>
from lightning.app.components.database.client import DatabaseClient
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/lightning/app/components/database/client.py", line 22, in <module>
from lightning.app.components.database.utilities import _GeneralModel
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/lightning/app/components/database/utilities.py", line 20, in <module>
from fastapi import Response, status
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/__init__.py", line 7, in <module>
from .applications import FastAPI as FastAPI
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/applications.py", line 16, in <module>
from fastapi import routing
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/routing.py", line 32, in <module>
from fastapi.dependencies.models import Dependant
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/dependencies/models.py", line 4, in <module>
from fastapi.security.base import SecurityBase
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/security/__init__.py", line 1, in <module>
from .api_key import APIKeyCookie as APIKeyCookie
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/security/api_key.py", line 3, in <module>
from fastapi.openapi.models import APIKey, APIKeyIn
File "/Users/andre/mamba/envs/ptbench/lib/python3.11/site-packages/fastapi/openapi/models.py", line 58, in <module>
class Contact(BaseModel):
File "pydantic/main.py", line 186, in pydantic.main.ModelMetaclass.__new__
TypeError: Argument 'bases' has incorrect type (expected list, got tuple)
Shall we upgrade pydantic, or downgrade lightning?
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- André Anjos assigned to @dcarron
assigned to @dcarron
- Author Owner
@dcarron - I'm completely blocked until this is resolved. My environment is as such:
$ mamba list # packages in environment at /Users/andre/mamba/envs/ptbench: # # Name Version Build Channel absl-py 1.4.0 pyhd8ed1ab_0 conda-forge aiohttp 3.8.5 py311heffc1b2_0 conda-forge aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge alabaster 0.7.13 pyhd8ed1ab_0 conda-forge anyio 3.7.1 pyhd8ed1ab_0 conda-forge arrow 1.2.3 pyhd8ed1ab_0 conda-forge async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge auto-intersphinx 1.0.3 pyhd8ed1ab_0 conda-forge babel 2.12.1 pyhd8ed1ab_1 conda-forge backoff 2.2.1 pyhd8ed1ab_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.cached-property 1.0.2 pyhd8ed1ab_0 conda-forge backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.12.2 pyha770c72_0 conda-forge blessed 1.19.1 pyhe4f9e05_2 conda-forge blinker 1.6.2 pyhd8ed1ab_0 conda-forge brotli 1.0.9 h1a8c8d9_9 conda-forge brotli-bin 1.0.9 h1a8c8d9_9 conda-forge brotlipy 0.7.0 py311he2be06e_1005 conda-forge bzip2 1.0.8 h3422bc3_4 conda-forge c-ares 1.19.1 hb547adb_0 conda-forge ca-certificates 2023.7.22 hf0a4a13_0 conda-forge cachecontrol 0.12.14 pyhd8ed1ab_0 conda-forge cachecontrol-with-filecache 0.12.14 pyhd8ed1ab_0 conda-forge cachetools 5.3.1 pyhd8ed1ab_0 conda-forge certifi 2023.7.22 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py311hae827db_3 conda-forge cfgv 3.3.1 pyhd8ed1ab_0 conda-forge charset-normalizer 3.2.0 pyhd8ed1ab_0 conda-forge clapper 1.0.1 pyhd8ed1ab_0 conda-forge cleo 2.0.1 pyhd8ed1ab_0 conda-forge click 8.1.3 unix_pyhd8ed1ab_2 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge contourpy 1.1.0 py311he4fd1f5_0 conda-forge coverage 7.2.7 py311heffc1b2_0 conda-forge crashtest 0.4.1 pyhd8ed1ab_0 conda-forge croniter 1.4.1 pyhd8ed1ab_0 conda-forge cryptography 41.0.2 py311h5fb2c35_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge dateutils 0.6.12 py_0 conda-forge deepdiff 6.3.1 pyhd8ed1ab_0 conda-forge distlib 0.3.7 pyhd8ed1ab_0 conda-forge docutils 0.19 py311h267d04e_1 conda-forge dulwich 0.21.5 py311heffc1b2_0 conda-forge exceptiongroup 1.1.2 pyhd8ed1ab_0 conda-forge fancycompleter 0.9.1 py311h267d04e_1005 conda-forge fastapi 0.100.0 pyhd8ed1ab_0 conda-forge filelock 3.12.2 pyhd8ed1ab_0 conda-forge fonttools 4.41.1 py311heffc1b2_0 conda-forge freetype 2.12.1 hd633e50_1 conda-forge frozenlist 1.4.0 py311heffc1b2_0 conda-forge fsspec 2023.6.0 pyh1a96a4e_0 conda-forge furo 2023.5.20 pyhd8ed1ab_1 conda-forge gmp 6.2.1 h9f76cd9_0 conda-forge gmpy2 2.1.2 py311h2ba9262_1 conda-forge google-auth 2.22.0 pyh1a96a4e_0 conda-forge google-auth-oauthlib 1.0.0 pyhd8ed1ab_1 conda-forge grpcio 1.54.2 py311ha891d26_2 conda-forge h11 0.14.0 pyhd8ed1ab_0 conda-forge html5lib 1.1 pyh9f0ad1d_0 conda-forge icu 72.1 he12128b_0 conda-forge identify 2.5.26 pyhd8ed1ab_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge imagesize 1.4.1 pyhd8ed1ab_0 conda-forge importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge importlib_resources 6.0.0 pyhd8ed1ab_1 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge inquirer 3.1.3 pyhd8ed1ab_0 conda-forge itsdangerous 2.1.2 pyhd8ed1ab_0 conda-forge jaraco.classes 3.3.0 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.3.0 pyhd8ed1ab_1 conda-forge jsonschema 4.18.4 pyhd8ed1ab_0 conda-forge jsonschema-specifications 2023.7.1 pyhd8ed1ab_0 conda-forge keyring 23.13.1 py311h267d04e_0 conda-forge kiwisolver 1.4.4 py311hd6ee22a_1 conda-forge lcms2 2.15 hd835a16_1 conda-forge lerc 4.0.0 h9a09cb3_0 conda-forge libabseil 20230125.3 cxx17_h13dd4ca_0 conda-forge libblas 3.9.0 17_osxarm64_openblas conda-forge libbrotlicommon 1.0.9 h1a8c8d9_9 conda-forge libbrotlidec 1.0.9 h1a8c8d9_9 conda-forge libbrotlienc 1.0.9 h1a8c8d9_9 conda-forge libcblas 3.9.0 17_osxarm64_openblas conda-forge libcxx 16.0.6 h4653b0c_0 conda-forge libdeflate 1.18 h1a8c8d9_0 conda-forge libffi 3.4.2 h3422bc3_5 conda-forge libgfortran 5.0.0 12_3_0_hd922786_1 conda-forge libgfortran5 12.3.0 ha3a6a3e_1 conda-forge libgrpc 1.54.2 h0a338ca_2 conda-forge libiconv 1.17 he4db4b2_0 conda-forge libjpeg-turbo 2.1.5.1 h1a8c8d9_0 conda-forge liblapack 3.9.0 17_osxarm64_openblas conda-forge libopenblas 0.3.23 openmp_hc731615_0 conda-forge libpng 1.6.39 h76d750c_0 conda-forge libprotobuf 3.21.12 hb5ab8b9_0 conda-forge libsqlite 3.42.0 hb31c410_0 conda-forge libtiff 4.5.1 h23a1a89_0 conda-forge libwebp-base 1.3.1 hb547adb_0 conda-forge libxcb 1.15 hf346824_0 conda-forge libxml2 2.11.4 he3bdae6_0 conda-forge libxslt 1.1.37 h1728932_1 conda-forge libzlib 1.2.13 h53f4e23_5 conda-forge lightning 2.0.6 pyhd8ed1ab_0 conda-forge lightning-cloud 0.5.37 pyhd8ed1ab_0 conda-forge lightning-utilities 0.9.0 pyhd8ed1ab_0 conda-forge llvm-openmp 16.0.6 h1c12783_0 conda-forge lockfile 0.12.2 py_1 conda-forge lxml 4.9.3 py311hbafe683_0 conda-forge markdown 3.4.4 pyhd8ed1ab_0 conda-forge markdown-it-py 3.0.0 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 py311heffc1b2_0 conda-forge matplotlib 3.7.1 py311ha1ab1f8_0 conda-forge matplotlib-base 3.7.1 py311h99a5f44_0 conda-forge mdurl 0.1.0 pyhd8ed1ab_0 conda-forge more-itertools 10.0.0 pyhd8ed1ab_0 conda-forge mpc 1.3.1 h91ba8db_0 conda-forge mpfr 4.2.0 he09a6ba_0 conda-forge mpmath 1.3.0 pyhd8ed1ab_0 conda-forge msgpack-python 1.0.5 py311hd6ee22a_0 conda-forge multidict 6.0.4 py311he2be06e_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge ncurses 6.4 h7ea286d_0 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge nodeenv 1.8.0 pyhd8ed1ab_0 conda-forge numpy 1.24.4 py311hb8f3215_0 conda-forge oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge openjpeg 2.5.0 hbc2ba62_2 conda-forge openssl 3.1.1 h53f4e23_1 conda-forge ordered-set 4.1.0 pyhd8ed1ab_0 conda-forge orjson 3.9.2 py311he74e4cd_0 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge pandas 2.0.2 py311h9e438b8_0 conda-forge pdbpp 0.10.3 pyhd8ed1ab_0 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge pillow 9.5.0 py311h095fde6_1 conda-forge pip 23.2.1 pyhd8ed1ab_0 conda-forge pkginfo 1.9.6 pyhd8ed1ab_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 3.9.1 pyhd8ed1ab_0 conda-forge pluggy 1.2.0 pyhd8ed1ab_0 conda-forge poetry 1.5.1 osx_pyhd8ed1ab_0 conda-forge poetry-core 1.6.1 pyhd8ed1ab_0 conda-forge poetry-plugin-export 1.4.0 pyhd8ed1ab_0 conda-forge pooch 1.7.0 pyha770c72_3 conda-forge pre-commit 3.3.3 pyha770c72_0 conda-forge protobuf 4.21.12 py311ha397e9f_0 conda-forge psutil 5.9.5 py311he2be06e_0 conda-forge ptbench 1.0.0b0 pypi_0 pypi pthread-stubs 0.4 h27ca646_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pyasn1 0.4.8 py_0 conda-forge pyasn1-modules 0.2.7 py_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pydantic 1.10.12 py311heffc1b2_0 conda-forge pygments 2.15.1 pyhd8ed1ab_0 conda-forge pyjwt 2.8.0 pyhd8ed1ab_0 conda-forge pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge pyparsing 3.1.0 pyhd8ed1ab_0 conda-forge pyproject_hooks 1.0.0 pyhd8ed1ab_0 conda-forge pyrepl 0.9.0 py311he2be06e_7 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.4.0 pyhd8ed1ab_0 conda-forge pytest-cov 4.1.0 pyhd8ed1ab_0 conda-forge python 3.11.0 h3ba56d0_1_cpython conda-forge python-build 0.10.0 pyhd8ed1ab_1 conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-editor 1.0.4 py_0 conda-forge python-installer 0.7.0 pyhd8ed1ab_0 conda-forge python-multipart 0.0.6 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.11 3_cp311 conda-forge pytorch 2.0.0 cpu_py311hb4bb8ad_0 conda-forge pytorch-lightning 2.0.6 pyhd8ed1ab_0 conda-forge pytz 2023.3 pyhd8ed1ab_0 conda-forge pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py311he2be06e_5 conda-forge rapidfuzz 2.15.1 py311ha397e9f_0 conda-forge re2 2023.03.02 hc5e2d97_0 conda-forge readchar 4.0.5 pyhd8ed1ab_0 conda-forge readline 8.2 h92ec313_1 conda-forge referencing 0.30.0 pyhd8ed1ab_0 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge requests-toolbelt 1.0.0 pyhd8ed1ab_0 conda-forge rich 13.4.2 pyhd8ed1ab_0 conda-forge rpds-py 0.9.2 py311h0563b04_0 conda-forge rsa 4.9 pyhd8ed1ab_0 conda-forge scikit-learn 1.2.2 py311hf0b18b8_2 conda-forge scipy 1.11.0 py311h93d07a4_0 conda-forge setuptools 68.0.0 pyhd8ed1ab_0 conda-forge shellingham 1.5.1 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sleef 3.5.1 h156473d_2 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sphinx 6.2.1 pyhd8ed1ab_0 conda-forge sphinx-autodoc-typehints 1.21.8 pyhd8ed1ab_0 conda-forge sphinx-basic-ng 1.0.0b2 pyhd8ed1ab_0 conda-forge sphinx-click 4.4.0 pyhd8ed1ab_0 conda-forge sphinx-copybutton 0.5.2 pyhd8ed1ab_0 conda-forge sphinx-inline-tabs 2023.4.21 pyhd8ed1ab_0 conda-forge sphinxcontrib-applehelp 1.0.4 pyhd8ed1ab_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.1 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_2 conda-forge starlette 0.27.0 pyhd8ed1ab_0 conda-forge starsessions 1.3.0 pyhd8ed1ab_0 conda-forge sympy 1.12 pypyh9d50eac_103 conda-forge tabulate 0.9.0 pyhd8ed1ab_1 conda-forge tensorboard 2.13.0 pyhd8ed1ab_0 conda-forge tensorboard-data-server 0.7.0 py311h507f6e9_0 conda-forge threadpoolctl 3.2.0 pyha21a80b_0 conda-forge tk 8.6.12 he1e0b03_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tomli-w 1.0.0 pyhd8ed1ab_0 conda-forge tomlkit 0.11.8 pyha770c72_0 conda-forge torchmetrics 0.11.4 pyhd8ed1ab_0 conda-forge torchvision 0.15.2 cpu_py311h88737c0_1 conda-forge tornado 6.3.2 py311heffc1b2_0 conda-forge tqdm 4.65.0 pyhd8ed1ab_1 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge trove-classifiers 2023.7.6 pyhd8ed1ab_0 conda-forge typing 3.10.0.0 pyhd8ed1ab_0 conda-forge typing-extensions 4.7.1 hd8ed1ab_0 conda-forge typing_extensions 4.7.1 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge ukkonen 1.0.1 py311hd6ee22a_3 conda-forge urllib3 1.26.15 pyhd8ed1ab_0 conda-forge uvicorn 0.23.1 py311h267d04e_0 conda-forge virtualenv 20.24.2 pyhd8ed1ab_0 conda-forge wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.6.1 pyhd8ed1ab_0 conda-forge websockets 11.0.3 py311heffc1b2_0 conda-forge werkzeug 2.3.6 pyhd8ed1ab_0 conda-forge wheel 0.41.0 pyhd8ed1ab_0 conda-forge wmctrl 0.4 pyhd8ed1ab_0 conda-forge xattr 0.10.1 py311he2be06e_0 conda-forge xdg 6.0.0 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.11 hb547adb_0 conda-forge xorg-libxdmcp 1.1.3 h27ca646_0 conda-forge xz 5.2.6 h57fd34a_0 conda-forge yaml 0.2.5 h3422bc3_2 conda-forge yarl 1.9.2 py311heffc1b2_0 conda-forge zipp 3.16.2 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h53f4e23_5 conda-forge zstd 1.5.2 h4f39d0f_7 conda-forge
Suggestions?
- Author Owner
I got by with a re-install. Closing this for now.
- André Anjos closed
closed
- Author Owner
I think we are haunted by this again: https://gitlab.idiap.ch/biosignal/software/ptbench/-/jobs/349692
If anybody has ideas on how to solve this, @biosignal, I'd be glad to hear them ASAP.
Note that the above log is issued from a pip install and not from a mamba install as was before.
- André Anjos reopened
reopened
- Author Owner
A similar issue was closed on lightning's repo on July 8th: https://github.com/Lightning-AI/lightning/pull/18022, but that did not solve it completely.
Another fix was planned for 2.0.6: https://github.com/Lightning-AI/lightning/issues/18027, but looks like they missed it: https://github.com/Lightning-AI/lightning/pull/18030? (Says it was merged into
master
on July 10th, but there are further commits a couple of weeks ago, July 19th and 21st. - 2.0.6 is from July 24th., so it should be in...) - Author Owner
In mamba/conda, packagers pinned
pydantic <2.0,>=1.7.4
(https://github.com/conda-forge/lightning-feedstock/blob/main/recipe/meta.yaml). Because we are using pip, we don't get that "fix" during the test phase. The only solution I see for the time being is to bring this pin to the package declaration, and leave this issue opened until that is resolved on the lightning side. - André Anjos mentioned in commit e544d3cc
mentioned in commit e544d3cc
- André Anjos added Blocked on external input label
added Blocked on external input label
- André Anjos mentioned in commit d07d3970
mentioned in commit d07d3970
- Maintainer
Was fixed in d07d3970
- Daniel CARRON closed
closed
- André Anjos mentioned in commit 6c09539b
mentioned in commit 6c09539b
- André Anjos mentioned in commit 05c24a29
mentioned in commit 05c24a29