Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ CREATE VECTOR INDEX NodeEmbeddingIndex
ON NodeEmbedding(embeddings)
WHERE embeddings IS NOT NULL
OPTIONS (
distance_type = 'COSINE',
flat_index = true
distance_type = 'COSINE'
);

CREATE MODEL NodeEmbeddingModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_latest_lock_timestamp(database):
return None

def get_updated_nodes(database, timestamp, node_types):
"""Gets subject_ids and names from Node table where update_timestamp > timestamp.
"""Gets subject_ids and names from Node table where last_update_timestamp > timestamp.
Yields results to avoid loading all into memory.

Args:
Expand All @@ -55,7 +55,7 @@ def get_updated_nodes(database, timestamp, node_types):
Yields:
Dictionaries containing subject_id and name.
"""
timestamp_condition = "update_timestamp > @timestamp" if timestamp else "TRUE"
timestamp_condition = "last_update_timestamp > @timestamp" if timestamp else "TRUE"

updated_node_sql = f"""
SELECT subject_id, name, types FROM Node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SpannerClient:
and getting/updating import statuses.
"""
_LOCK_ID = "global_ingestion_lock"
_EMBEDDING_MODEL_PATH = "projects/{project}/locations/{location}/publishers/google/models/{model}"
_EMBEDDING_MODEL_PATH = "//aiplatform.googleapis.com/projects/{project}/locations/{location}/publishers/google/models/{model}"

def __init__(self,
project_id: str,
Expand Down
Loading