-
Notifications
You must be signed in to change notification settings - Fork 772
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
Add ability to specify Postgres connection credentials #564
Conversation
Thanks for your contribution, @michaelbautin. I'm a bit skeptical about the proposed solution, because it makes this very pronounced from an API point of view, while it only applies to a very small subset of the algorithms. Can you achieve the same functionality by specifying these credentials in the config file https://github.com/erikbern/ann-benchmarks/blob/main/ann_benchmarks/algorithms/pgvector/config.yml? If I remember correctly, you can provide it in the |
179a8f7
to
e90984d
Compare
@maumueller Thank you for your feedback. I've reworked the PR to avoid introducing generic command-line parameters, and instead made it controllable by Postgres-specific environment variables. Also I've added automatic pgvector extension creation and a way to avoid attempting to start PostgreSQL service if it is managed in a different way. Cc @erikbern |
I think that looks good, @michaelbautin. I suppose your use-case is that the implementation is run locally outside of the Docker environment? Otherwise it seems a bit difficult to pass these variables into the container with the current setup. |
@maumueller yes, my use case is that the Postgres server is not managed by ann-benchmarks scripts. In my experiments I frequently need a Postgres server set up in a very specific way in a cloud environment. |
Alright, I can merge this if you agree that it provides the necessary functionality. One last thing: Do you think a short comment in the |
@maumueller : sounds great, thank you! I will add the comment shortly. |
e90984d
to
c6531a5
Compare
@maumueller I've added the requested comment. Thank you! |
Thank you for the contribution, @michaelbautin! |
vector
PostgreSQL extension automatically if it does not exist.Fixes: #563