-
Notifications
You must be signed in to change notification settings - Fork 416
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(langchain): use correct class names for pinecone vectorstore check #9759
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 117508 Passed, 59424 Skipped, 3h 46m 11.81s Total duration (5h 43m 26.16s time saved) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9759 +/- ##
===========================================
- Coverage 74.30% 10.53% -63.77%
===========================================
Files 1398 1367 -31
Lines 129930 127822 -2108
===========================================
- Hits 96541 13466 -83075
- Misses 33389 114356 +80967 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-07-17 21:07:08 Comparing candidate commit 02c34b2 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 214 metrics, 2 unstable metrics. |
808f930
to
6b42456
Compare
6b42456
to
f7527b6
Compare
c9caf8f
to
ace857f
Compare
756838d
to
ff73f6f
Compare
ff73f6f
to
0c4acea
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.
Deferring to other reviewers
Note: there is a cassette file issue with the dependency updates, will look into this |
|
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.9 2.9
# Navigate to the new working tree
cd .worktrees/backport-2.9
# Create a new branch
git switch --create backport-9759-to-2.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ab3d2ce4fcb10e6e18646656c046ad37f67f85b4
# Push it to GitHub
git push --set-upstream origin backport-9759-to-2.9
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.9 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.10 2.10
# Navigate to the new working tree
cd .worktrees/backport-2.10
# Create a new branch
git switch --create backport-9759-to-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ab3d2ce4fcb10e6e18646656c046ad37f67f85b4
# Push it to GitHub
git push --set-upstream origin backport-9759-to-2.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10 Then, create a pull request where the |
#9759) This PR fixes the class names used to check for `Pinecone` vectorstore instances in the langchain integration. Previously the incorrect base class for all vectorstores was being used, which would mean all vectorstores would return true for this check. Langchain has a tricky versioning system with tons of deprecations and removals (even between minor versions): - `langchain<0.1`: Uses the base `langchain` module to access `langchain.vectorstores.Pinecone` (note this indirectly imports from `langchain_community`. - `langchain>=0.1`: Uses the `langchain_community` module to access `langchain_community.vectorstores.Pinecone` - `langchain>=0.1` but if users have `langchain-pinecone` installed: Uses `langchain_pinecone` module to access `langchain_pinecone.vectorstores.Pinecone` (deprecated, subclass of `PineconeVectorStore`) or `langchain_pinecone.vectorstores.PineconeVectorStore`. We use the above information to use as the logic to check if an instance is a pinecone vectorstore. - [x] The PR description includes an overview of the change - [x] The PR description articulates the motivation for the change - [x] The change includes tests OR the PR description describes a testing strategy - [x] The PR description notes risks associated with the change, if any - [x] Newly-added code is easy to change - [x] The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - [x] The change includes or references documentation updates if necessary - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Newly-added code is easy to change - [x] Release note makes sense to a user of the library - [x] If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
#9759) This PR fixes the class names used to check for `Pinecone` vectorstore instances in the langchain integration. Previously the incorrect base class for all vectorstores was being used, which would mean all vectorstores would return true for this check. Langchain has a tricky versioning system with tons of deprecations and removals (even between minor versions): - `langchain<0.1`: Uses the base `langchain` module to access `langchain.vectorstores.Pinecone` (note this indirectly imports from `langchain_community`. - `langchain>=0.1`: Uses the `langchain_community` module to access `langchain_community.vectorstores.Pinecone` - `langchain>=0.1` but if users have `langchain-pinecone` installed: Uses `langchain_pinecone` module to access `langchain_pinecone.vectorstores.Pinecone` (deprecated, subclass of `PineconeVectorStore`) or `langchain_pinecone.vectorstores.PineconeVectorStore`. We use the above information to use as the logic to check if an instance is a pinecone vectorstore. - [x] The PR description includes an overview of the change - [x] The PR description articulates the motivation for the change - [x] The change includes tests OR the PR description describes a testing strategy - [x] The PR description notes risks associated with the change, if any - [x] Newly-added code is easy to change - [x] The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - [x] The change includes or references documentation updates if necessary - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Newly-added code is easy to change - [x] Release note makes sense to a user of the library - [x] If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
#9759) This PR fixes the class names used to check for `Pinecone` vectorstore instances in the langchain integration. Previously the incorrect base class for all vectorstores was being used, which would mean all vectorstores would return true for this check. Langchain has a tricky versioning system with tons of deprecations and removals (even between minor versions): - `langchain<0.1`: Uses the base `langchain` module to access `langchain.vectorstores.Pinecone` (note this indirectly imports from `langchain_community`. - `langchain>=0.1`: Uses the `langchain_community` module to access `langchain_community.vectorstores.Pinecone` - `langchain>=0.1` but if users have `langchain-pinecone` installed: Uses `langchain_pinecone` module to access `langchain_pinecone.vectorstores.Pinecone` (deprecated, subclass of `PineconeVectorStore`) or `langchain_pinecone.vectorstores.PineconeVectorStore`. We use the above information to use as the logic to check if an instance is a pinecone vectorstore. - [x] The PR description includes an overview of the change - [x] The PR description articulates the motivation for the change - [x] The change includes tests OR the PR description describes a testing strategy - [x] The PR description notes risks associated with the change, if any - [x] Newly-added code is easy to change - [x] The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - [x] The change includes or references documentation updates if necessary - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Newly-added code is easy to change - [x] Release note makes sense to a user of the library - [x] If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
#9875) Backports #9759 to 2.10. This PR fixes the class names used to check for `Pinecone` vectorstore instances in the langchain integration. Previously the incorrect base class for all vectorstores was being used, which would mean all vectorstores would return true for this check. Langchain has a tricky versioning system with tons of deprecations and removals (even between minor versions): - `langchain<0.1`: Uses the base `langchain` module to access `langchain.vectorstores.Pinecone` (note this indirectly imports from `langchain_community`. - `langchain>=0.1`: Uses the `langchain_community` module to access `langchain_community.vectorstores.Pinecone` - `langchain>=0.1` but if users have `langchain-pinecone` installed: Uses `langchain_pinecone` module to access `langchain_pinecone.vectorstores.Pinecone` (deprecated, subclass of `PineconeVectorStore`) or `langchain_pinecone.vectorstores.PineconeVectorStore`. We use the above information to use as the logic to check if an instance is a pinecone vectorstore. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
…k [backport 2.9] (#9934) Backport #9759 to 2.9. This PR fixes the class names used to check for `Pinecone` vectorstore instances in the langchain integration. Previously the incorrect base class for all vectorstores was being used, which would mean all vectorstores would return true for this check. Langchain has a tricky versioning system with tons of deprecations and removals (even between minor versions): - `langchain<0.1`: Uses the base `langchain` module to access `langchain.vectorstores.Pinecone` (note this indirectly imports from `langchain_community`. - `langchain>=0.1`: Uses the `langchain_community` module to access `langchain_community.vectorstores.Pinecone` - `langchain>=0.1` but if users have `langchain-pinecone` installed: Uses `langchain_pinecone` module to access `langchain_pinecone.vectorstores.Pinecone` (deprecated, subclass of `PineconeVectorStore`) or `langchain_pinecone.vectorstores.PineconeVectorStore`. We use the above information to use as the logic to check if an instance is a pinecone vectorstore. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
This PR fixes the class names used to check for
Pinecone
vectorstore instances in the langchain integration. Previously the incorrect base class for all vectorstores was being used, which would mean all vectorstores would return true for this check.This PR also marks langchain community llmobs tests as flaky due to the vcrpy issue as described in #9768.
Notes
Langchain has a tricky versioning system with tons of deprecations and removals (even between minor versions):
langchain<0.1
: Uses the baselangchain
module to accesslangchain.vectorstores.Pinecone
(note this indirectly imports fromlangchain_community
.langchain>=0.1
: Uses thelangchain_community
module to accesslangchain_community.vectorstores.Pinecone
langchain>=0.1
but if users havelangchain-pinecone
installed: Useslangchain_pinecone
module to accesslangchain_pinecone.vectorstores.Pinecone
(deprecated, subclass ofPineconeVectorStore
) orlangchain_pinecone.vectorstores.PineconeVectorStore
.We use the above information to use as the logic to check if an instance is a pinecone vectorstore.
Checklist
Reviewer Checklist