Conversation
The last refactor commits removed topo.base.dists.pairwise_distances, topo.spectral.eigen.spectral_layout, kNN's return_instance/random_state kwargs and the graph_kernel assignment, but left callers and state checks behind, so import and fit() were broken. - kernels.py: delegate to sklearn.metrics.pairwise_distances - spectral/eigen.py: import Kernel lazily inside fit() to break the kernels <-> spectral.eigen circular import - projector.py: spectral init via EigenDecomposition with random fallback; silence pyright on the vendored pymde/torch glue - _pipeline + uom + eval + intrinsic_dim: drop removed kNN kwargs - topograph.py: remove the dead graph_kernel attribute and its fitted-state check (operators are already exposed as P_Z_/K_Z_/P_msZ_/K_msZ_) - uom.py: set P_Z_/P_msZ_ so the UoM path passes the fitted-state check; annotate uom_eigenvalues_*_list for mypy/pyright - update tests for the current APIs (LE instead of spectral_layout, standalone find_ideal_projection, new error messages, mixin contracts) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Duplicate (or float32-identical) points produce zero-distance edges that
eliminate_zeros() silently dropped from CSR kNN graphs, leaving rows with
fewer than k neighbors and breaking downstream consumers, e.g. the CkNN
candidate search ("Row 1 contains 45 distances, expected at least 46").
Clamp genuine off-diagonal zero distances to float32 tiny so they survive
sparse storage and later float32 casts, while self-loops are still
eliminated. Applies to both the sklearn and HNSWlib graph builders.
Also update the kNN tests for the simplified API (return_instance is gone)
and add a duplicate-point regression test for both backends.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The only remaining consumer of topo.base.dists was the euclidean_grad default in graph_utils.simplicial_set_embedding. umap-learn ships an identical numba-jitted implementation (umap.distances.euclidean_grad), so use that and delete the module. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- move ipykernel/ipywidgets/jupyterlab from runtime dependencies to the dev group; the library itself never imports them - stop requiring hnswlib and pacmap at runtime; they were both required and offered as extras, and the code already guards them via _optional - fix the optional-dependency hint for hnswlib to name the actual extra ([ann], not the nonexistent [hnswlib]) - drop ruff per-file-ignores pointing at deleted files - remove the unused uv-init main.py stub (no console script references it) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- add the standalone building blocks to the API reference: compute_kernel, eigendecompose, LE, graph_laplacian, diffusion_operator, automated_scaffold_sizing, find_ideal_projection, run_best_projection - give cknn_graph a full NumPy-style docstring with parameters, returns and the Berry & Sauer reference Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- _example_utils.py: use topo.spectral.LE for the spectral layout initialization (spectral_layout was removed) and drop the removed weight= argument from EigenDecomposition - re-sync the .ipynb files from their jupytext .py sources, which had drifted (the .py side carries the Colab setup cells and doc links) The demo pipeline (kNN -> cknn Kernel -> msDM -> LE init -> PaCMAP -> metrics) was run end-to-end to verify. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The TopOGraph tests kept passing while the standalone building blocks (kNN, Kernel, EigenDecomposition, LE, Projector, cknn_graph) were broken, because nothing exercised them composed outside the orchestrator. Add two integration tests mirroring the documented custom-pipeline path so that class of breakage is caught. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.