From 95f88bb0758b24e00fcab12d3c51b09df45d270c Mon Sep 17 00:00:00 2001 From: Ismail Ashraq <issey1455@gmail.com> Date: Wed, 27 Mar 2024 23:10:35 +0500 Subject: [PATCH] remove print statements --- semantic_router/index/local.py | 2 -- semantic_router/index/pinecone.py | 2 -- semantic_router/layer.py | 1 - 3 files changed, 5 deletions(-) diff --git a/semantic_router/index/local.py b/semantic_router/index/local.py index 4bf212dc..6d322f07 100644 --- a/semantic_router/index/local.py +++ b/semantic_router/index/local.py @@ -68,7 +68,6 @@ class LocalIndex(BaseIndex): if self.index is None or self.routes is None: raise ValueError("Index or routes are not populated.") if route_filter is not None: - print(f"Filtering routes with filter: {route_filter}") filtered_index = [] filtered_routes = [] for route, vec in zip(self.routes, self.index): @@ -84,7 +83,6 @@ class LocalIndex(BaseIndex): sim = similarity_matrix(vector, self.index) scores, idx = top_scores(sim, top_k) route_names = [self.routes[i] for i in idx] - print(f"Routes considered for similarity calculation: {route_names}") return scores, route_names def delete(self, route_name: str): diff --git a/semantic_router/index/pinecone.py b/semantic_router/index/pinecone.py index 500b78e9..07d519f0 100644 --- a/semantic_router/index/pinecone.py +++ b/semantic_router/index/pinecone.py @@ -229,7 +229,6 @@ class PineconeIndex(BaseIndex): raise ValueError("Index is not populated.") query_vector_list = vector.tolist() if route_filter is not None: - print(f"Filtering routes with filter: {route_filter}") filter_query = {"sr_route": {"$in": route_filter}} else: filter_query = None @@ -241,7 +240,6 @@ class PineconeIndex(BaseIndex): ) scores = [result["score"] for result in results["matches"]] route_names = [result["metadata"]["sr_route"] for result in results["matches"]] - print(f"Routes considered for similarity calculation: {route_names}") return np.array(scores), route_names def delete_index(self): diff --git a/semantic_router/layer.py b/semantic_router/layer.py index ba99e04a..39232c69 100644 --- a/semantic_router/layer.py +++ b/semantic_router/layer.py @@ -241,7 +241,6 @@ class RouteLayer: vector = self._encode(text=text) route, top_class_scores = self._retrieve_top_route(vector, route_filter) - print(f"Selected route: {route.name if route else 'None'}") passed = self._check_threshold(top_class_scores, route) if passed and route is not None and not simulate_static: -- GitLab