Skip to content

Claude cleanup test - #11

Merged
jsture merged 7 commits into
masterfrom
fable
Jun 10, 2026
Merged

Claude cleanup test#11
jsture merged 7 commits into
masterfrom
fable

Conversation

@jsture

@jsture jsture commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

jsture and others added 7 commits June 10, 2026 11:41
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>
@jsture jsture self-assigned this Jun 10, 2026
@jsture
jsture merged commit e9bd726 into master Jun 10, 2026
7 checks passed
@jsture
jsture deleted the fable branch June 10, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant