Release notes

Changes in each published nlp-shap version. Newest first.

Unreleased

0.1.16 (2026-07-19)

Added

  • Optional sync CoalitionProgress callbacks on InferenceScheduler and ExplainRunner for per-coalition progress reporting (no-op when omitted).

  • Deterministic hash embeddings on mock generation_record_from_snapshot() so embedding-based value functions work in CI / mock campaigns.

  • BackendConfig.serialize_generate (default True) to serialize LM Studio generate calls; required for MLX backends that crash under concurrent predict.

  • LM Studio SDK websocket INFO logs are silenced on backend import.

Changed

  • DeletePolicy renders the empty coalition as empty message text instead of raising, so exact Shapley can evaluate \(v(\emptyset)\) under deletion absence.

  • NeymanEstimator initial sampling no longer waits on empty/grand M-matrix columns (which are never yielded), fixing an infinite loop on small player counts.

  • LM Studio model handles use ttl=None and retry once after unload/crash.

0.1.15 (2026-07-15)

Added

  • Runtime micro-benchmarks in tests/benchmarks/ for dedup keys, mask pack/unpack, archive round-trip (10k coalitions), and prefix-cache hits.

  • make bench and make bench-regression targets with recorded baselines.json and an optional >10% regression gate.

0.1.14 (2026-07-15)

Added

  • Extending nlp-shap user guide for optional extras and plugin entry points.

  • [dev] optional extra for contributor tooling.

  • Base-wheel smoke test ensuring torch is not installed without extras.

Changed

  • Removed the transitional explain.use_v2 YAML flag; the v2 explain pipeline is now the only path.

  • render_attribution() and render_attribution_html() load lazily so import nlp_shap works without [viz].

Documentation

  • README quickstart with ExplainRunner.

  • Getting-started explain walkthrough and API export table updates.

0.1.13 (2026-07-15)

Added

  • nlp_shap.viz with token_text and token_bar renderer plugins and render_attribution() public helper.

  • AttributionRenderer protocol and nlp_shap.renderers entry-point group.

  • Optional [viz] extra (matplotlib, ipywidgets).

  • Visualization user guide and attribution_viz / text_explain_e2e example notebooks.

Fixed

  • Lazy visualization imports so the published wheel passes the base import nlp_shap smoke test without matplotlib.

0.1.12 (2026-07-15)

Added

  • ApiBackend for OpenAI-compatible /chat/completions HTTP APIs via httpx.

  • In-memory response deduplication for identical request bodies at temperature: 0.0.

  • Optional [api] extra, config/dev_api.yaml, and mock-transport contract tests in CI.

  • User guide for generative backends: Generative backends.

0.1.11 (2026-07-15)

Added

  • TransformersTextBackend with chat templates, text-only validation, and contextual embedding hooks.

  • PrefixCacheManager with scheduler prefix grouping and kv_cache_hits metrics on SchedulerMetrics.

  • Optional [transformers] extra and config/dev_transformers.yaml.

  • @pytest.mark.gpu integration tests for local Hugging Face runs.

0.1.10 (2026-07-15)

Added

  • LmStudioBackend using lmstudio.AsyncClient.

  • BackendUnavailableError when the LM Studio API server is down.

  • Optional [lmstudio] extra, config/dev_lmstudio.yaml, and @pytest.mark.lms tests.

0.1.9 (2026-07-15)

Added

  • reanalyze() rescoring on archived coalitions with zero backend executions.

  • Grand-coalition base_generation.txt persisted in run archives before the coalition scheduler loop when precompute_base is enabled.

  • nlp_shap.runtime.telemetry with InMemoryObservabilitySink stage spans for orchestrator and estimator phases.

  • PerfSummary on ExplainRunOutput.

  • load() for reopening existing archives.

0.1.8 (2026-07-14)

Added

0.1.7 (2026-07-14)

Added

  • TfIdfCosineValue with frozen-corpus TF-IDF cosine scoring (U3).

  • CosineEmbeddingValue and EuclideanEmbeddingValue for embedding utilities (U1/U2/U4).

  • LogprobValue with deterministic stub logprobs.

  • Presentation normalizers in nlp_shap.estimation.normalizers.

  • GenerationRecord for token rows, embeddings, and logprobs.

  • tfidf_cosine, embedding_cosine, embedding_euclidean, and logprob value-function entry points; identity, abs_sum, power_shift, and min_max normalizer entry points.

0.1.6 (2026-07-14)

Added

  • MonteCarloEstimator for budgeted random coalition sampling with estimand-plugin aggregation.

  • ComplementaryEstimator for complementary-pair sampling and CC Shapley aggregation.

  • NeymanEstimator for two-phase Neyman-CC sampling with NeymanConfig controls.

  • Shared sampling helpers in nlp_shap.estimation._shared.

  • mc, complementary, and neyman_cc estimator entry points.

  • Theory and guide pages for approximate estimation.

  • estimator_comparison.ipynb comparing budget, sample count, and accuracy.

Changed

  • ExplanationConfig adds neyman settings for Neyman-CC runs.

  • Drop unnecessary from __future__ import annotations across the package; document the policy in development rules.

  • Consolidate Examples into a single list-table with hidden toctree.

0.1.5 (2026-07-13)

Added

  • ExactEstimator for lazy coalition enumeration with estimand-plugin aggregation.

  • iter_mask_ints() and iter_masks() for streaming masks without materializing 2^n coalitions.

  • estimate_attributions() wires coalition payoffs to Shapley or Banzhaf aggregators.

  • Vectorized exact Shapley aggregation for complete characteristic tables.

  • run_iter() and run_stream for bounded pending-task scheduling.

  • exact estimator entry point under nlp_shap.estimators.

Changed

  • build_coalition_key uses compact binary hashing instead of JSON serialization.

  • Marginal estimand aggregation uses integer bitmask keys and cached factorial weights.

  • sample_masks yields an iterator instead of a materialized tuple.

Documentation

  • Theory and usage guides for exact estimation and streaming scheduler usage.

  • API reference for nlp_shap.estimation.exact.

  • Example notebook examples/exact_estimation.ipynb.

  • Performance review rules in contributor workflow.

0.1.4 (2026-07-13)

Added

Documentation

  • Theory and usage guides for the runtime archive, dedup, and scheduler.

  • API reference page for nlp_shap.runtime.

  • Example notebook examples/runtime_core.ipynb.

0.1.3 (2026-07-12)

Added

Documentation

  • Theory and usage guides for coalition masking and absence policies.

  • API reference page for nlp_shap.masking.

  • Example notebook examples/masking_views.ipynb.

0.1.2 (2026-07-12)

Added

Documentation

  • Sphinx theory pages for cooperative games and estimands (Shapley vs Banzhaf).

  • Usage guide for estimand aggregators, results, and manifests.

  • Expanded API reference for public modules.

  • Example notebook examples/estimands_toy_game.ipynb.

  • Furo theme, getting-started page, embedded notebook rendering, and API module layout.

Tooling

  • make notebooks target to execute example notebooks in place before commit.

0.1.1 (2026-07-12)

Added

0.1.0 (2026-07-12)

Added

  • Initial PyPI package layout and nlp_shap import surface.

  • Logging bootstrap from [tool.logging] in pyproject.toml via logging518.