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

Databackend-agnostic vector-types #2515

Open
blythed opened this issue Oct 10, 2024 · 0 comments
Open

Databackend-agnostic vector-types #2515

blythed opened this issue Oct 10, 2024 · 0 comments

Comments

@blythed
Copy link
Collaborator

blythed commented Oct 10, 2024

In embedding models, we have this type of logic:

    def _pre_create(self, db):
        """Pre creates the model.

        If the datatype is not set and the datalayer is an IbisDataBackend,
        the datatype is set to ``sqlvector`` or ``vector``.

        :param db: The datalayer instance.
        """
        if self.datatype is not None:
            return

        from superduper.components.vector_index import sqlvector, vector

        if db.databackend.db_type == DBType.SQL:
            self.datatype = sqlvector(shape=self.shape)
        else:
            self.datatype = vector(shape=self.shape)

We need to find a way to do this more generally so that apps with vectors can be deployed on all databackends, without editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant