-
Notifications
You must be signed in to change notification settings - Fork 231
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: async sync and pinecone methods #487
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #487 +/- ##
==========================================
+ Coverage 73.74% 74.84% +1.09%
==========================================
Files 43 43
Lines 3596 3753 +157
==========================================
+ Hits 2652 2809 +157
Misses 944 944 ☔ View full report in Codecov by Sentry. |
PR Type
Enhancement, Tests
Description
BaseIndex
,PineconeIndex
, andSemanticRouter
for operations like adding, deleting, syncing, and configuration management.BaseIndex
class with async methods for locking and unlocking mechanisms, ensuring better concurrency handling.PineconeIndex
for batch upserts, deletions, and route ID retrieval.async_sync
and related methods inSemanticRouter
to enable asynchronous synchronization of routes.TestAsyncSemanticRouter
to validate async functionality, including initialization, synchronization, and locking mechanisms.RETRY_WAIT_TIME
for retry intervals.Changes walkthrough 📝
base.py
Add asynchronous methods for index operations in BaseIndex.
semantic_router/index/base.py
in the
BaseIndex
class.RETRY_WAIT_TIME
for better configurability.pinecone.py
Implement asynchronous operations for Pinecone index management.
semantic_router/index/pinecone.py
retrieval.
_async_upsert
and_async_delete
.aadd
method to handle asynchronous batch operations.base.py
Add asynchronous synchronization methods in SemanticRouter.
semantic_router/routers/base.py
async_sync
method for asynchronous synchronization ofroutes.
synchronization status.
retrieval.
test_sync.py
Add unit tests for asynchronous synchronization and locking.
tests/unit/test_sync.py
TestAsyncSemanticRouter
for testingasynchronous methods.
mechanisms.