Skip to content

libsdca 0.4.0 - #10

Merged
mlapin merged 6 commits into
masterfrom
release/0.3.1-final
Nov 16, 2026
Merged

mlapin merged 6 commits into
masterfrom
release/0.3.1-final

Conversation

@mlapin

@mlapin mlapin commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

libsdca 0.4.0 replaces the 0.3.x interfaces with one consistent, breaking API design and fixes the issues found while reviewing it.

  • One contract for every interface: the same loss names; each loss takes only its own parameters (k, gamma, alpha, temperature); one target kind per loss (labels, label sets / masks, teacher logits, target probabilities for training); no string aliases or sentinel values; TypeError for wrong types and ValueError for bad values, checked up front.
  • NumPy: loss objects (fit(X, y, libsdca.TopKHingeBeta(k=2)), loss_and_grad, coordinate_update), explicit Kernel and Probabilities inputs, seed and num_threads.
  • scikit-learn: libsdca.sklearn.SDCAClassifier with scikit-learn names (max_iter, n_jobs, random_state, kernel="precomputed"); passes check_estimator.
  • PyTorch and JAX: one function and module per loss with keyword-only options; cross-entropy and linear cross-entropy take label smoothing and probability targets; the single-label losses take weight and ignore_index; torch.func transforms work for every loss.
  • Rust: Loss variants with their parameters, a Solver builder, Settings and Threads, typed evaluation history.
  • C ABI (version 6), C++, MATLAB: separate loss, execution, target and fit-option structs with validation before any write; C++ objectives named as the shared losses with a gamma parameter and self-contained headers; MATLAB with the shared names and 1-based labels.
  • Fixes: an entropy coordinate step at a label probability of 1 no longer fails a fit; size limits are checked before allocating; a fit stopped by max_epoch reports solved when its last evaluation meets tol; eval_epoch = 0 evaluates only at the end everywhere.
  • CI: the Python jobs run a profile of the conformance matrix (--conformance ci); a manual run with conformance: full runs the full matrix and uploads the records of failing cells.

The fused loss kernels are unchanged, so the benchmarks in python/TORCH.md stand. See CHANGELOG.md for details.

…32 work by default

See CHANGELOG.md for the changes since 0.3.0. The numerics and performance write-ups under
docs/ are replaced by the known limits in docs/API.md, the benchmarks in python/TORCH.md and
the technical report.
Clean APIs in every interface (breaking): one vocabulary of losses, each taking only its
own parameters, one target kind per loss, no aliases or sentinel values, TypeError and
ValueError up front. C ABI version 6, C++ objectives with the shared names, MATLAB with
shared names and 1-based labels, NumPy loss objects, a scikit-learn SDCAClassifier with
sklearn names, one PyTorch/JAX function and module per loss (label smoothing, probability
targets, weight, ignore_index, torch.func), and a Rust Solver/Loss/Settings API. Fixes an
entropy step at label probability 1, size checks before allocating, and the status of a
fit stopped by max_epoch. CI runs a profile of the conformance matrix.
@mlapin mlapin changed the title libsdca 0.3.1 libsdca 0.4.0: clean APIs in every interface Nov 16, 2026
@mlapin mlapin changed the title libsdca 0.4.0: clean APIs in every interface libsdca 0.4.0 Nov 16, 2026
@mlapin
mlapin merged commit ee40bfe into master Nov 16, 2026
32 of 33 checks passed
@mlapin
mlapin deleted the release/0.3.1-final branch November 16, 2026 18: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