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

[PLUGINS] Bump Version [snowflake] #2750

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/snowflake/superduper_snowflake/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .vector_search import SnowflakeVectorSearcher as VectorSearcher
from .data_backend import SnowflakeDataBackend as DataBackend

__version__ = "0.5.13"
__version__ = "0.5.16"

__all__ = [
"VectorSearcher",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "superduper-framework"
description = "🔮 Bring AI to your favourite database 🔮"
readme = "README.md"
version = '0.5.6'
version = '0.5.9'
license = {file = "LICENSE"}
maintainers = [{name = "superduper.io, Inc.", email = "[email protected]"}]
keywords = [
Expand Down
8 changes: 8 additions & 0 deletions superduper/backends/query_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ def __init__(
self._documents = list(
self.db.execute(self.select.select_using_ids(ids))
)
primary_id = self.select.id_field
# is it possible that the _documents came out in a different order?
# if so, resort them
lookup = {
r[primary_id]: r for r in self._documents
}
self._documents = [lookup[id] for id in ids]
# DONE
else:
if ids is None:
self._ids = [
Expand Down
4 changes: 4 additions & 0 deletions superduper/components/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,11 @@ def _prepare_inputs_from_select(
X_data: t.Any
mapping = Mapping(X, self.signature)
if in_memory:
logging.info('Loading data into memory...')
docs = list(self.db.execute(select.select_using_ids(ids)))
pid = select.table_or_collection.primary_id
lookup = {r[pid]: r for r in docs}
docs = [lookup[id_] for id_ in ids]
X_data = list(map(lambda x: mapping(x), docs))
else:
assert isinstance(self.db, Datalayer)
Expand Down
4 changes: 4 additions & 0 deletions superduper/rest/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def build_rest_app(app: SuperDuperApp):
"""
CFG.log_colorize = False

@app.add("/health", method="get")
def health():
return {"status": 200}

@app.add("/handshake/config", method="post")
def handshake(cfg: str):
from superduper import CFG
Expand Down
Loading