Skip to main content

cuscan

cuscan 0.1.0 provides non-parametric UMAP dimensionality reduction and HDBSCAN clustering in Rust and Python. UMAP follows umap-learn 0.5.12 semantics. The implementation uses Burn and CubeCL for CPU and CUDA execution.

Local build

The documented local target is Linux x86-64, including WSL2. Python 3.12+, uv and Maturin are required. rust-toolchain.toml pins nightly-2026-08-08 (rustc 1a98b1e13), and the x86-64 Linux Cargo configuration requires /usr/sbin/clang and mold and enables nightly flags. From the repository root:

uv sync
uv run maturin develop --release

Use uv run --no-sync for subsequent scripts or tests so syncing does not replace the locally built extension. The CubeCL LLVM bundle/build/JIT path can require network access, cache space and LLVM support. CPU and CUDA are both compiled; CUDA execution requires a working NVIDIA runtime and device. Compilation alone does not initialize CUDA.

Wheel validation

The lowest validated Linux x86-64 wheel baseline is manylinux 2.34. The manylinux 2.28 image fails to build because tracel-llvm-23.1.0-4's llvm-config requires GLIBC 2.32, 2.33 and 2.34.

Python

import numpy as np
from cuscan import HDBSCAN, UMAP

X = np.random.default_rng(42).normal(size=(100, 10)).astype(np.float32)
mapper = UMAP(n_neighbors=15, random_state=42, backend="cpu")
embedding = mapper.fit_transform(X)
projected = mapper.transform(X[:5])

clusterer = HDBSCAN(min_cluster_size=5, backend="cpu").fit(X)
labels = clusterer.labels_
new_labels, strengths = clusterer.approximate_predict(X[:5])

Both estimators accept backend="auto", "cpu", or "cuda". Auto prefers a discovered usable CUDA device and selects CPU only when CUDA is unavailable. Explicit choices are strict; execution errors do not trigger fallback.

Fitted-model serialization

Install the optional HDF5 dependencies locally with uv sync --extra serialization, then rebuild with uv run maturin develop --release. The extra supplies h5py and hdf5plugin; ordinary fitting does not require them.

mapper.save("umap.h5")
restored = UMAP.load("umap.h5", backend="cpu")
projected = restored.transform(X[:5])

predictor = clusterer.to_predictor()
predictor.save("predictor.h5")

UMAP saves fitted state; HDBSCAN serialization is for HDBSCANPredictor, not the fitted estimator or its fit outputs. Load a predictor with HDBSCANPredictor.load(path, backend="auto", device_index=0). Backend and device are chosen at load time. save refuses to overwrite by default; overwrite=True explicitly replaces a file. Publication flushes a same-directory temporary file and commits atomically. On POSIX, a post-commit directory-sync failure reports uncertain durability. Windows flushes file data but does not guarantee directory-entry durability across a crash.

Files use a versioned HDF5 schema and lossless Blosc2 Zstandard compression, not pickle. External HDF5 readers need the Blosc2 filter plugin (ID 32026). Files contain training data or geometry and derived model state; protect them like the original data. Schema validation and compression do not authenticate files. Rust does not provide an HDF5 persistence API. Serialized numeric state does not guarantee identical execution across hardware, software versions or backends.

The cuscan_fitted_model format rejects older model files; retrain and save them in the new format. There are no compatibility aliases for prior imports, crates or environment variables.

Rust

The workspace exposes the umap and hdbscan facades. Build and test them locally:

cargo build --release -p umap -p hdbscan
cargo test -p umap
cargo test -p hdbscan

See development and analysis for Rust API examples, detailed backend behavior, profiling, comparisons, serialization benchmarks and testing guidance. Historical benchmark measurements there are not cuscan rebenchmarks.

The CI and release guidance describes the intended ci-ok gate, local act, independent CUDA validation, trusted publishing and the maintainer's settings checklist.

Releases use one reviewed Release Please PR and a shared Cargo/Python version. Squash PRs with Conventional Commit titles (feat:, fix:, or feat!: for a breaking change). Before 1.0, breaking changes bump minor. Merging the release PR creates the public GitHub release first; PyPI artifacts arrive only after the separate cold-build publishing workflow succeeds. A GitHub release alone is not proof of publication. See the activation checklist.

Unmodified engineering reports are retained under archive/engineering/; its index.json maps original paths to archived files and records their content hashes. Their commands, identities and source paths describe historical revisions, not the current checkout.

References and acknowledgements

License

The project is declared MIT; see LICENSE for the retained legal notice. THIRD_PARTY_NOTICES contains scoped upstream notices and provenance limitations. Upstream provenance and bundled-native notices require review separately from the project's maintainer identity; see migration_provenance.json for unresolved questions.

Metadata

Release files for cuscan 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cuscan 0.1.2
File Size Uploaded Provenance Actions
cuscan-0.1.2.tar.gz 2.3 MB With provenance Details for cuscan-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cuscan 0.1.2
File Interpreter ABI Platform Actions
cuscan-0.1.2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for cuscan-0.1.2-cp312-abi3-win_amd64.whl
cuscan-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl CPython 3.12 abi3 Linux glibc 2.34+ x86-64 Details for cuscan-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl

Total release size: 97.5 MB

Release files / cuscan-0.1.2.tar.gz

Download URL cuscan-0.1.2.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a6eca01643898f7a9c6432ca20c746191f07c5ec4bfeca303f876e63b9baccb8
BLAKE2b-256 checksum
How to use checksums
8ba4839a3171d56e7afd1af82e9b4543aa381c8178a373b1d989fc7c51d915eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / cuscan-0.1.2-cp312-abi3-win_amd64.whl

Download URL cuscan-0.1.2-cp312-abi3-win_amd64.whl
Size 43.9 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bec364e784eb6a42be2ea5e7cc091f5808edd635a2de2a4e3a0dabe2ca8d67f8
BLAKE2b-256 checksum
How to use checksums
4a1beb1a36130c416b9b3712145838ceaeb5d228a56c59f484c439a5314632ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / cuscan-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl

Download URL cuscan-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl
Size 51.3 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
7b37944c7ba2dac00bb02522690f62d9997a1f2ef9213db7ce8a0bc64afa7cf4
BLAKE2b-256 checksum
How to use checksums
869acb5e8bb41ab1198c949ecfca38572d0466b78b56ef36a4aaf7c08502fc74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for cuscan 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for cuscan-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page