Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting pydantic.errors.ConfigError: duplicate validator function while accessing Vectordbbench URL #464

Open
chetan-shah01 opened this issue Jan 30, 2025 · 6 comments
Assignees

Comments

@chetan-shah01
Copy link

Hi Team,

I have build the VectorDbBench using v0.0.21 and deployed it on pod. While accessing the Vectordbbench Url , getting below error :

Can you please suggest on that ?

pydantic.errors.ConfigError: duplicate validator function "vectordb_bench.backend.clients.api.DBConfig.not_empty_field"; if this is intended, set allow_reuse=True
Traceback:
File "/opt/code/vectordb_bench/frontend/pages/tables.py", line 2, in
from vectordb_bench.frontend.components.check_results.headerIcon import drawHeaderIcon
File "/opt/code/vectordb_bench/frontend/components/check_results/headerIcon.py", line 1, in
from vectordb_bench.frontend.config.styles import HEADER_ICON
File "/opt/code/vectordb_bench/frontend/config/styles.py", line 1, in
from vectordb_bench.models import DB
File "/opt/code/vectordb_bench/models.py", line 10, in
from .backend.cases import CaseType
File "/opt/code/vectordb_bench/backend/cases.py", line 5, in
from vectordb_bench.backend.clients.api import MetricType
File "/opt/code/vectordb_bench/backend/clients/init.py", line 3, in
from .api import (
File "/opt/code/vectordb_bench/backend/clients/api.py", line 33, in
class DBConfig(ABC, BaseModel):
File "/opt/code/vectordb_bench/backend/clients/api.py", line 66, in DBConfig
@validator("*")
^^^^^^^^^^^^^^
File "pydantic/class_validators.py", line 93, in pydantic.class_validators.validator.dec
File "pydantic/class_validators.py", line 156, in pydantic.class_validators._prepare_validator

@alwayslove2013
Copy link
Collaborator

I will check it later.

@alwayslove2013 alwayslove2013 self-assigned this Jan 31, 2025
@chetan-shah01
Copy link
Author

Hi @alwayslove2013 ,

Can you please suggest for above issue ?

Regards,
Chetan Shah

@chetan-shah01
Copy link
Author

Also is there any "streamlit/config.toml" config file in vectordb code ?

[server]
port = 8501
enableCORS = false
enableXsrfProtection = false
headless = true

@alwayslove2013
Copy link
Collaborator

@chetan-shah01 Sorry, due to the long holiday for the Chinese Lunar New Year. I will check this issue soon.

@alwayslove2013
Copy link
Collaborator

alwayslove2013 commented Feb 6, 2025

@chetan-shah01 please check the version of pydantic, it should be <2.0

pip list | grep pydantic

File "/opt/code/vectordb_bench/backend/clients/api.py", line 66, in DBConfig
@validator("*")
^^^^^^^^^^^^^^
File "pydantic/class_validators.py", line 93, in pydantic.class_validators.validator.dec
File "pydantic/class_validators.py", line 156, in pydantic.class_validators._prepare_validator

@alwayslove2013
Copy link
Collaborator

@chetan-shah01 We utilized the cmd command to configure Streamlit's settings instead of using the config.toml file. You are welcome to modify the settings directly as needed.

cmd = [
"streamlit",
"run",
f"{pathlib.Path(__file__).parent}/frontend/vdb_benchmark.py",
"--logger.level",
"info",
"--theme.base",
"light",
"--theme.primaryColor",
"#3670F2",
"--theme.secondaryBackgroundColor",
"#F0F2F6",
]

Also is there any "streamlit/config.toml" config file in vectordb code ?
[server]
port = 8501
enableCORS = false
enableXsrfProtection = false
headless = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants