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

Error running Evals after installation - pydantic library #1

Open
shyam-krish opened this issue Apr 4, 2024 · 2 comments
Open

Error running Evals after installation - pydantic library #1

shyam-krish opened this issue Apr 4, 2024 · 2 comments

Comments

@shyam-krish
Copy link

I used OpenAI Evals to run an eval and get a jsonl report. I then pip installed zeno-evals to view the report. But when I went back to run another eval I got the following error:

ImportError: cannot import name 'TypeAdapter' from 'pydantic' (/proj-evals/.env/lib/python3.9/site-packages/pydantic/__init__.cpython-39-darwin.so)

It seems that installing zeno-evals changed some versioning of this pydantic library that was breaking evals so I had to do pip install --upgrade pydantic. This fixed evals but broke zeno-evals.

OS
macOS 14.1.1

Python version
v3.9.6

@JuanmaMenendez
Copy link

@shyam-krish I am having a similar problem. It looks like there is an issue with the pydantic version used for both libraries.

In my case the error is:

"pydantic.errors.PydanticUserError: A non-annotated attribute was detected: calculate_histogram_metrics = True. All model fields require a type annotation; if calculate_histogram_metrics is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types']."

Any solution ?

@shyam-krish
Copy link
Author

@JuanmaMenendez I ended up working around it by creating a different virtual env and pip installed zeno-evals there. I just switch back and forth between the venvs when using evals and zeno evals

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