cluster-deps-are-optional
IN premise
`sentence-transformers` and `scikit-learn` are optional dependencies behind a `HAS_CLUSTER_DEPS` gate; the module degrades to a clear `ImportError` with install instructions when they are absent.
Summary
The clustering functionality in the module is designed to work without its heavy machine learning dependencies installed. If sentence-transformers or scikit-learn are missing, the code catches the import failure and raises a helpful error telling the user what to install, rather than crashing with a confusing traceback. This means the core system stays lightweight and only pulls in these larger packages when someone actually needs the clustering feature.
Details
| Source | entries/2026/05/08/reasons_lib-cluster.md |