Skip to content
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

partners/astradb: bootstrapping Astra DB as Partner Package #16875

Merged
merged 38 commits into from
Feb 15, 2024

Conversation

hemidactylus
Copy link
Contributor

Description: This PR introduces a new "Astra DB" Partner Package.

So far only the vector store class is duplicated there, all others following once this is validated and established.

Along with the move to separate package, incidentally, the class name will change AstraDB => AstraDBVectorStore.

The strategy has been to duplicate the module (with prospected removal from community at LangChain 0.2). Until then, the code will be kept in sync with minimal, known differences (there is a makefile target to automate drift control. Out of convenience with this check, the community package has a class AstraDBVectorStore aliased to AstraDB at the end of the module).

With this PR several bugfixes and improvement come to the vector store, as well as a reshuffling of the doc pages/notebooks (Astra and Cassandra) to align with the move to a separate package.

Dependencies: A brand new pyproject.toml in the new package, no changes otherwise.

Twitter handle: @rsprrs

@efriis efriis added the partner label Feb 1, 2024
@efriis efriis self-assigned this Feb 1, 2024
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 1, 2024
Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 11:29pm

@dosubot dosubot bot added Ɑ: vector store Related to vector store module 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels Feb 1, 2024
Copy link
Collaborator

@cbornet cbornet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work !

Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
@cbornet
Copy link
Collaborator

cbornet commented Feb 11, 2024

It would be convenient to have an astradb package extra that would pull langchain-astradb. But that can be done in future work.

Copy link
Member

@efriis efriis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of these changes in community, let's just leave it as-is and add a @deprecated(..., alternative_import="langchain_astradb.AstraDBVectorStore"). People can update to the new one that way!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efriis do you mean that we don't try to keep community and partner code in sync ? And won't do any evolution on community side ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@efriis So we can work on the assumption that the merged PR and the new package on PyPI will essentially happen at once?
I am asking because, if so, I can go ahead and update most imports in the example notebooks and such (which was originally kept as a 2nd-phase step, after package published)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to still do as second step. Easier to validate that everything is working as intended

Create an AstraDBVectorStore vector store object. See class docstring for help.
"""
try:
from astrapy.db import (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all imports can now be top-level as a concrete dep! No more optional needed, and can properly lint too :)


[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain-core = ">=0.0.12"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to ^0.1

Comment on lines +8 to +9
export ASTRA_DB_API_ENDPOINT="https://<DB-ID>-us-east1.apps.astra.datastax.com"
export ASTRA_DB_APPLICATION_TOKEN="AstraCS:........."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add necessary secrets to .github/workflows/_release.yml and .github/workflows/_integration_test.yml

@hemidactylus
Copy link
Contributor Author

Hello, @efriis , I think I have addressed all your remarks. I am going to share the CI/CD secrets in a direct message momentarily.

I'd appreciate a quick confirmation that the PR is now as intended :) thank you!

@efriis efriis merged commit 5240eca into langchain-ai:master Feb 15, 2024
94 checks passed
@cbornet
Copy link
Collaborator

cbornet commented Feb 16, 2024

Awesome 😃 ! Can't wait to see the first package on Pypi !

@hemidactylus hemidactylus deleted the SL-astradb-as-partner branch February 16, 2024 09:43
haydeniw pushed a commit to haydeniw/langchain that referenced this pull request Feb 27, 2024
**Description:** This PR introduces a new "Astra DB" Partner Package.

So far only the vector store class is _duplicated_ there, all others
following once this is validated and established.

Along with the move to separate package, incidentally, the class name
will change `AstraDB` => `AstraDBVectorStore`.

The strategy has been to duplicate the module (with prospected removal
from community at LangChain 0.2). Until then, the code will be kept in
sync with minimal, known differences (there is a makefile target to
automate drift control. Out of convenience with this check, the
community package has a class `AstraDBVectorStore` aliased to `AstraDB`
at the end of the module).

With this PR several bugfixes and improvement come to the vector store,
as well as a reshuffling of the doc pages/notebooks (Astra and
Cassandra) to align with the move to a separate package.

**Dependencies:** A brand new pyproject.toml in the new package, no
changes otherwise.

**Twitter handle:** `@rsprrs`

---------

Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features partner size:XXL This PR changes 1000+ lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants