-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Feature] Bump VizroAI to pydantic V2 #1018
Conversation
View the example dashboards of the current commit live on PyCafe ☕ 🚀Updated on: 2025-02-24 17:44:26 UTC Compare the examples using the commit's wheel file vs the latest released version: vizro-core/examples/scratch_devView with commit's wheel vs View with latest release vizro-core/examples/dev/View with commit's wheel vs View with latest release vizro-core/examples/visual-vocabulary/View with commit's wheel vs View with latest release vizro-ai/examples/dashboard_ui/ |
…nto feature/bump_vizroai_v2
langchain_openai with_structured_output supports "function_calling" and "json_schema".
This means if we now use
it's equivalent to what we did before pydantic v2 migration. If this conclusion is true, I'd prefer to first ship pydantic v2 migration code along with Let know wdyt @maxschulz-COL :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ Looks good to me! ⭐
Thanks for partially reverting stuff, and great inquisition as to the default behaviour before 0.3.0
!
vizro-ai/tests/unit/vizro-ai/dashboard/_graph/test_dashboard_creation.py
Outdated
Show resolved
Hide resolved
vizro-ai/tests/unit/vizro-ai/dashboard/_response_models/conftest.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good on my side now. @maxschulz-COL may I have another review from you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
vizro-ai/tests/unit/vizro-ai/dashboard/_graph/test_dashboard_creation.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Great job. 🚀
I noticed just small visual issue in the chart UI (not caused by this PR) that I will fix in a separate small PR this week.
Description
[Update]
This is a draft of a first working version, will hand off to you @lingyielia now, because you are probably better positioned to do the fine-tuning. I also left one todo for you @nadijagraca , maybe you already have some time this week?
Overall considerations
tool_calling
only - hence it doesn’t usestructured_output
, that’s why it doesn’t failstructured_output
ortool_calling
structured_output
doesn’t work withpattern
gpt-40
andmax_retry=1
on both frameworks with a reasonably complex dashboard request to produce the plan suggests that in PydanticAI it gets it while in Langchain it doesn’t - even on 3 retries langchain doesn’t get itstr
from the members), each member is registered as a separate tool with the model in order to reduce the complexity of the tool schemas and maximise the chances a model will respond correctly.”vm.Dashboard
claude-3-5-sonnet-latest
) but not latest OpenAI model (gpt-40
) apart from the impossible things--> Ergo overall I am still confident in us changing to pydanticAI - but I left the core code in in case you disagree @lingyielia .
ToDos
TODO[LZ]
orTODO[NG]
respectivelyScreenshot
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":