-
Notifications
You must be signed in to change notification settings - Fork 20.3k
chore(core): Update LangChainTracer to use Pydantic v2 methods #34541
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
base: master
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #34541 will improve performance by 29.25%Comparing
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | test_import_time[HumanMessage] |
312.3 ms | 265.9 ms | +17.46% |
| ⚡ | WallTime | test_import_time[InMemoryVectorStore] |
790.7 ms | 611.8 ms | +29.25% |
| ⚡ | WallTime | test_import_time[RunnableLambda] |
625.8 ms | 493 ms | +26.94% |
| ⚡ | WallTime | test_import_time[Runnable] |
636.1 ms | 497.3 ms | +27.93% |
| ⚡ | WallTime | test_import_time[LangChainTracer] |
563.9 ms | 437.5 ms | +28.88% |
| ⚡ | WallTime | test_import_time[CallbackManager] |
588.6 ms | 461.6 ms | +27.49% |
| ⚡ | WallTime | test_import_time[BaseChatModel] |
661.8 ms | 525.5 ms | +25.95% |
| ⚡ | WallTime | test_import_time[tool] |
666.8 ms | 518.2 ms | +28.66% |
| ⚡ | WallTime | test_import_time[ChatPromptTemplate] |
741.8 ms | 593.9 ms | +24.92% |
| ⚡ | WallTime | test_import_time[Document] |
217.7 ms | 185 ms | +17.64% |
Footnotes
-
21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
…/langchain into angus/langsmith-pydantic-v2
Description
In LangSmith 0.6.0, we update the Run and RunTree object to use pydantic v2. This PR adds support for this change by using the correct method for langsmith >= 0.6.0 pydantic >= v2. It has backwards compatibility for older sdk versions as well with deprecated methods