diff --git a/src/workbench/algorithms/graph/light/proximity_graph.py b/src/workbench/algorithms/graph/light/proximity_graph.py index 4b564083..905f349a 100644 --- a/src/workbench/algorithms/graph/light/proximity_graph.py +++ b/src/workbench/algorithms/graph/light/proximity_graph.py @@ -44,6 +44,7 @@ def _build_graph(self, store_features: bool) -> None: """ # Retrieve all neighbors and their distances id_column = self.proximity.id_column + log.info("Retrieving all neighbors...") all_neighbors_df = self.proximity.all_neighbors() # Add nodes with attributes (features) @@ -174,7 +175,7 @@ def get_neighborhood(self, node_id: Union[str, int], radius: int = 1) -> nx.Grap fs = FeatureSet("aqsol_mol_descriptors") df = fs.pull_dataframe() - df = df.sample(100) + df = df.sample(1000) df = compute_morgan_fingerprints(df) # Build a graph using FingerprintProximity diff --git a/src/workbench/api/graph_store.py b/src/workbench/api/graph_store.py index 2121a03d..672044c1 100644 --- a/src/workbench/api/graph_store.py +++ b/src/workbench/api/graph_store.py @@ -128,7 +128,7 @@ def delete(self, location: str): d["weight"] = 1.0 # Store the graph - graph_store.upsert("test_graph", G) + graph_store.upsert("test/test_graph", G) # Get a summary of the graphs print("Graph Store Summary:") @@ -139,19 +139,19 @@ def delete(self, location: str): print(graph_store.details()) # Last modified date - print("Last modified:", graph_store.last_modified("test_graph")) + print("Last modified:", graph_store.last_modified("test/test_graph")) # List all graphs print("List all graphs in the store:") print(graph_store.list()) # Retrieve and display the graph - retrieved_graph = graph_store.get("test_graph") + retrieved_graph = graph_store.get("test/test_graph") print("Retrieved Graph Edges:", retrieved_graph.edges(data=True)) # Check if the graph exists - print("Graph exists:", graph_store.check("test_graph")) + print("Graph exists:", graph_store.check("test/test_graph")) # Delete the graph - graph_store.delete("test_graph") - print("Graph exists after deletion:", graph_store.check("test_graph")) + graph_store.delete("test/test_graph") + print("Graph exists after deletion:", graph_store.check("test/test_graph"))