Delete a node from the graph based on the specified node_id. :param node_id: The node_id to delete
(self, node_id: str)
| 280 | self._graph.add_edge(source_node_id, target_node_id, **edge_data) |
| 281 | |
| 282 | async def delete_node(self, node_id: str): |
| 283 | """ |
| 284 | Delete a node from the graph based on the specified node_id. |
| 285 | |
| 286 | :param node_id: The node_id to delete |
| 287 | """ |
| 288 | if self._graph.has_node(node_id): |
| 289 | self._graph.remove_node(node_id) |
| 290 | logger.info(f"Node {node_id} deleted from the graph.") |
| 291 | else: |
| 292 | logger.warning(f"Node {node_id} not found in the graph for deletion.") |
| 293 | |
| 294 | async def embed_nodes(self, algorithm: str) -> tuple[np.ndarray, list[str]]: |
| 295 | if algorithm not in self._node_embed_algorithms: |