Santiago Vila pushed to branch master at Debian Med / umap-learn
Commits: 4a97e7ce by Santiago Vila at 2026-11-22T21:45:00+01:00 Cap n_jobs at the numba thread pool size. This is the upstream fix for the single-CPU issue and replaces the previous patch. - - - - - 55f7987f by Santiago Vila at 2026-11-22T21:50:00+01:00 Return early for empty strings in levenshtein_myers_ascii. Patch by Atishay Kasliwal. Should hopefully fix autopkgtests on ppc64el. - - - - - 46d0475d by Santiago Vila at 2026-11-22T21:55:00+01:00 Upload for unstable as 0.6.0+dfsg-3 - - - - - 4 changed files: - debian/changelog - + debian/patches/return-early-for-empty-strings.patch - debian/patches/series - debian/patches/single-cpu.patch Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,13 @@ +umap-learn (0.6.0+dfsg-3) unstable; urgency=medium + + * Team upload. + * Cap n_jobs at the numba thread pool size. + Patch by Sebastian Breguel, supersedes the fix in 0.6.0+dfsg-2. + * Return early for empty strings in levenshtein_myers_ascii. + Patch by Atishay Kasliwal. Should fix autopkgtests on ppc64el. + + -- Santiago Vila <[email protected]> Sun, 22 Nov 2026 21:55:00 +0100 + umap-learn (0.6.0+dfsg-2) unstable; urgency=medium * Team upload. ===================================== debian/patches/return-early-for-empty-strings.patch ===================================== @@ -0,0 +1,23 @@ +From: Atishay Kasliwal <[email protected]> +Subject: Return early for empty strings in levenshtein_myers_ascii + +An empty x made top_bit 1 << -1. Numba compiles that to an LLVM shift +whose result is undefined, so on ppc64el the score never changed and +the distance came out 0. Handle empty strings first, as levenshtein +already does. + +--- a/umap/distances.py ++++ b/umap/distances.py +@@ -1307,6 +1307,12 @@ + if abs(x_len - y_len) > max_distance: + return float(max_distance) / normalisation + ++ # An empty x would make top_bit below 1 << -1, which is undefined ++ if x_len == 0: ++ return float(y_len) / normalisation ++ if y_len == 0: ++ return float(x_len) / normalisation ++ + # Myers' bit-parallel algorithm is limited to word size + # fall back to levenshtein if words are large + if x_len > 63 or y_len > 63: ===================================== debian/patches/series ===================================== @@ -5,3 +5,4 @@ skip_tests_needing_tensorflow.patch fix_further_tests.patch fix-example.patch single-cpu.patch +return-early-for-empty-strings.patch ===================================== debian/patches/single-cpu.patch ===================================== @@ -1,25 +1,14 @@ -From: Santiago Vila <[email protected]> -Subject: Skip tests requiring more numba threads than available -Forwarded: https://github.com/lmcinnes/umap/issues/1354 +From: Sebastian Breguel <[email protected]> +Subject: Cap n_jobs at the numba thread pool size +Origin: upstream, https://github.com/lmcinnes/umap/commit/447aef08d71ad1048d7b8c2c962f61f2eb48b8f4 ---- a/umap/tests/test_optimizer_dispatch.py -+++ b/umap/tests/test_optimizer_dispatch.py -@@ -6,6 +6,7 @@ - optimizer, and DensMAP is only implemented for Euclidean output embeddings. - """ +--- a/umap/umap_.py ++++ b/umap/umap_.py +@@ -3100,6 +3100,7 @@ + f"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism." + ) + self.n_jobs = 1 ++ self.n_jobs = min(self.n_jobs, numba.config.NUMBA_NUM_THREADS) -+import numba - import numpy as np - import pytest - import scipy.sparse -@@ -130,6 +131,10 @@ - assert np.isfinite(model.rad_emb_).all() - - [email protected]( -+ numba.config.NUMBA_NUM_THREADS < 2, -+ reason="requires at least two numba threads", -+) - @pytest.mark.parametrize("optimizer", MODERN_OPTIMIZERS) - def test_unseeded_parallel_fit_is_finite(optimizer): - data, _ = make_blobs( + if self.dens_lambda < 0.0: + raise ValueError("dens_lambda cannot be negative") View it on GitLab: https://salsa.debian.org/med-team/umap-learn/-/compare/6618266a1238e494e621c08631eb976d8d8206af...46d0475d2a770210901838846e88313b570bb425 -- View it on GitLab: https://salsa.debian.org/med-team/umap-learn/-/compare/6618266a1238e494e621c08631eb976d8d8206af...46d0475d2a770210901838846e88313b570bb425 You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
