Skip to content

Commit

Permalink
More reductions
Browse files Browse the repository at this point in the history
  • Loading branch information
odeke-em committed Feb 3, 2025
1 parent 3c65bc9 commit aa6a6c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

DEFAULT_PYTHON_VERSION = "3.10"
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
LINT_PATHS = ["samples", "src", "tests", "noxfile.py"]
LINT_PATHS = ["src", "tests", "noxfile.py"]


nox.options.sessions = [
Expand Down
6 changes: 2 additions & 4 deletions src/langchain_google_spanner/vector_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TableColumn:
name: str
type: str
is_null: bool = True
vector_length: int = None
vector_length: Optional[int] = None

def __post_init__(self):
# Check if column_name is None after initialization
Expand Down Expand Up @@ -285,7 +285,7 @@ class QueryParameters:

class NearestNeighborsAlgorithm(Enum):
"""
Enum for k-nearest neighbors search algorithms.
Enum for nearest neighbors search algorithms.
"""

EXACT_NEAREST_NEIGHBOR = 1
Expand Down Expand Up @@ -444,7 +444,6 @@ def _generate_sql(
embedding_config = list(
filter(lambda x: x.name == embedding_column, column_configs)
)
print("column_configs", column_configs, "\nembedding_config", embedding_config)
if embedding_column and len(embedding_config) > 0:
config = embedding_config[0]
if config.vector_length is None or config.vector_length <= 0:
Expand Down Expand Up @@ -642,7 +641,6 @@ def __init__(
ignore_metadata_columns: Optional[List[str]] = None,
metadata_json_column: Optional[str] = None,
query_parameters: QueryParameters = QueryParameters(),
skip_not_nullable_columns=False,
):
"""
Initialize the SpannerVectorStore.
Expand Down

0 comments on commit aa6a6c2

Please sign in to comment.