-
Notifications
You must be signed in to change notification settings - Fork 605
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
Adding documentation for Pgvector integration #5505
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request expands the FiftyOne Brain documentation by introducing a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant "FiftyOne Brain"
participant "Pgvector Config"
participant "Postgres (Pgvector)"
User->>FiftyOne Brain: Request similarity search
FiftyOne Brain->>Pgvector Config: Retrieve pgvector configuration
Pgvector Config->>Postgres (Pgvector): Execute vector search query
Postgres (Pgvector)->>Pgvector Config: Return similarity results
Pgvector Config->>FiftyOne Brain: Forward results
FiftyOne Brain->>User: Deliver search outcome
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docs/source/integrations/index.rst (1)
228-228
: Naming Consistency in Toctree Entry.
The toctree lists the new entry as “Postgres” while the tutorial card header is “Pgvector.” Consider aligning the naming (for example, using “Pgvector”) to avoid any potential confusion.docs/source/index.rst (1)
129-133
: Review of the Custom Image Link for Postgres Integration.
The new customimagelink directive is well formatted. However, note that its image title is “Postgres,” which may be at odds with the “Pgvector” branding used in other parts of the documentation. Double-check if this is intentional or if renaming to “Pgvector” would improve overall clarity.docs/source/brain.rst (1)
2129-2132
: Potential Inconsistency in Naming for the New Backend Configuration.
The brain configuration section now includes an entry labeled “postgres” with a configuration class offiftyone.brain.internal.core.postgres.PostgresSimilarityConfig
, whereas the documentation elsewhere refers to the feature as “pgvector.” Consider aligning these names—perhaps by using “pgvector” consistently—so that users are not confused by two different names for the same integration.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
docs/source/_static/images/integrations/postgres.png
is excluded by!**/*.png
,!**/*.png
📒 Files selected for processing (4)
docs/source/brain.rst
(3 hunks)docs/source/index.rst
(1 hunks)docs/source/integrations/index.rst
(2 hunks)docs/source/integrations/pgvector.rst
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (16)
docs/source/integrations/index.rst (1)
128-134
: New Tutorial Card for Pgvector Integration Added.
The new card follows the established format with clear attributes (header, description, link, image, tags). Verify that the image (using a Postgres icon) and the description fully capture the pgvector extension’s purpose.docs/source/integrations/pgvector.rst (13)
1-13
: Clear Introduction for Pgvector Integration.
The introduction effectively introduces the Pgvector extension by linking to its repository and summarizing its relevance. The “Pgvector Vector Search Integration” title and the following description set a solid context.
14-28
: API Overview and Visual Aids are Well Presented.
The explanation of how FiftyOne supports Pgvector—including the note about natural language search—and the inclusion of a centered image are executed clearly. This will help users quickly grasp the new capabilities.
29-37
: Informative Basic Recipe Section.
The “Basic recipe” section lays out the step-by-step workflow in an accessible list format. This clear structure should make it easy for users to follow the process from starting a PostgreSQL server to querying the data.
54-64
: Prerequisites and Installation Details Are Clear.
The note emphasizing the prerequisites—such as having a PostgreSQL instance with pgvector and installing the psycopg2 module—is well supported by the shell code block. This aids in reducing potential setup errors.
74-94
: Comprehensive Code Example for Creating and Querying a Similarity Index.
The provided code example clearly demonstrates how to load a dataset, compute embeddings, and query results using the Pgvector backend. The stepwise commentary on each action is very helpful for users.
120-128
: Setup Section Provides Clear Environment Preparation Guidance.
The instructions for installing via Docker and the psycopg2 client are detailed and easy to follow. This section ensures that users will have the necessary components to use the Pgvector backend successfully.
128-165
: Detailed Configuration and Usage Instructions.
The documentation effectively explains how to invoke the Pgvector backend by setting thebackend
parameter and how to permanently configure it via environment variables or the brain configuration file.
166-194
: Robust Explanation of Authentication Options.
Multiple strategies for supplying PostgreSQL credentials (environment variables, brain config, and method arguments) are presented with clear examples. This flexibility is beneficial for various user setups.
241-283
: Informative Pgvector Config Parameters Section.
Listing the query customization parameters (such asmetric
,work_mem
,hnsw_m
, etc.) with an accompanying JSON snippet enhances user understanding on how to fine-tune the backend.
305-377
: Comprehensive Guidance for Managing Brain Runs.
The section detailing methods for listing, retrieving, renaming, and deleting brain runs (and cleaning up the external Pgvector index) is very thorough. The clear examples should help users manage their similarity indexes effectively.
378-447
: Practical Use Cases Shown in the Examples Section.
The examples illustrate multiple approaches to creating similarity indexes—whether computing embeddings on the fly, using precomputed embeddings, or working with patch similarity. The variations discussed will be useful for both beginner and advanced users.
448-487
: Valuable Advanced Usage Scenarios.
The advanced examples demonstrating connectivity to existing indexes, updating embeddings, and retrieving index information are clear and add depth to the documentation. They provide excellent value for power users looking to customize their implementations.
488-687
: Overall, Pgvector Documentation is Thorough and User-Friendly.
This new documentation file covers all aspects—from setup and configuration to advanced usage—with clear, detailed guidance. It will serve as an excellent resource for users integrating Pgvector with FiftyOne.docs/source/brain.rst (2)
440-456
: New Pgvector Backend Entry Added to Similarity Backends.
The new entry for the pgvector backend is integrated neatly into the list of supported similarity backends. Confirm that the reference labelpgvector-integration
correctly navigates to the Pgvector documentation.
1-2218
: Overall Integration in the Brain Documentation is Well Executed.
The comprehensive update to include the Pgvector backend enriches the similarity indexing capabilities. Ensure that the naming across the board (pgvector vs. postgres) is consistent to maintain clarity for users.
What changes are proposed in this pull request?
Adds in documentation for Pgvector integration
How is this patch tested? If it is not, please explain why.
Built docs locally to test
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
notes for FiftyOne users.
Pgvector integration added into fiftyone-brain
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit