-
Notifications
You must be signed in to change notification settings - Fork 44.5k
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
fix(agent, forge): Silence Pydantic v2 protected namespace model_
warning
#7340
fix(agent, forge): Silence Pydantic v2 protected namespace model_
warning
#7340
Conversation
✅ Deploy Preview for auto-gpt-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7340 +/- ##
=======================================
Coverage 54.21% 54.21%
=======================================
Files 122 122
Lines 6875 6875
Branches 881 881
=======================================
Hits 3727 3727
Misses 3015 3015
Partials 133 133
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
How about we replace all of these with llm_*
? Slightly bigger refactor, but no need to infringe on the model_*
namespace. I'm not sure why Pydantic made it a protected namespace, but I'd rather not disable that (default) protection if we don't need to.
I considered that but yes it's more changes. I'll replace field |
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 and clean. LGTM!
Background
After updating to Pydantic v2 Pydantic complains about model fields with
model_
prefix as it's a Pydantic protected namespace:To silence this warning fields need to be renamed or namespace need to be removed from
protected_namespaces
.Changes 🏗️
This PR renames
model_*
fields tollm_*
in affected models.PR 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