-
Notifications
You must be signed in to change notification settings - Fork 44.8k
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
feat(forge, agent, benchmark): Upgrade to Pydantic v2 #7280
Conversation
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
✅ Deploy Preview for auto-gpt-docs canceled.
|
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7280 +/- ##
==========================================
+ Coverage 25.50% 28.00% +2.49%
==========================================
Files 80 102 +22
Lines 4662 6557 +1895
Branches 631 961 +330
==========================================
+ Hits 1189 1836 +647
- Misses 3403 4640 +1237
- Partials 70 81 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
341bdf3
to
012cb15
Compare
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.
Legendary effort. Thank you very much for pulling this.
Question marks and suggestions: ⬇️ (or ⬆️ in the app)
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
@@ -9,21 +9,23 @@ packages = [{ include = "agbenchmark" }] | |||
|
|||
[tool.poetry.dependencies] | |||
python = "^3.10" | |||
# helicone = "^1.0.9" # incompatible with openai@^1.0.0 | |||
agent-protocol-client = "^1.1.0" | |||
agent-protocol-client = {git = "https://github.com/Significant-Gravitas/agent-protocol.git", subdirectory = "packages/client/python"} |
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.
- fix(client/python): Update generator script and config for Pydantic v2 and re-generate agent-protocol#2
- Make
v1.2.0
tag after merging above PR - Pin this dependency to
rev = "v1.2.0"
to prevent it from auto-updating to dev versions
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.
This can wait until after this PR is merged
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.
LGTM!
Background
Agent Server is incompatible with AutoGPT&Forge because they use pydantic v2 and v1 respectively.
Changes 🏗️
Update Pydantic dependency of
autogpt
,forge
andbenchmark
to^2.7
Pydantic Migration Guide
None
has to be specified explicitly forOptional
and model fields without defaults are required (Ellipsis...
for required fields is deprecated)Config
class for specifying model configuration is deprecated, nowmodel_config
class attribute needs to be set toConfigDict
object with configurationkwargs
(extra
) can no longer be passed toField
agent-protocol
and updated only client package: https://github.com/kcze/agent-protocolModelContainer
inBaseAgent
, component configuration is now serialized using Pydantic v2 functions directlyPR Quality Scorecard ✨
+2 pts
+5 pts
+5 pts
+5 pts
-4 pts
+4 pts
+5 pts
-5 pts
agbenchmark
to verify that these changes do not regress performance?+10 pts