Skip to content

v0.2.1: Pure-Python wheel + Ordered Newton inference

Latest

Choose a tag to compare

@TheHiddenObserver TheHiddenObserver released this 08 Jul 15:47
a4879fb

statgpu v0.2.1

Published to PyPI: https://pypi.org/project/statgpu/0.2.1/

pip install statgpu==0.2.1
# GPU (pick ONE by CUDA version)
pip install "statgpu[gpu12]==0.2.1"   # or gpu11 / torch

English

Packaging / PyPI release — the highlight of this version

  • Pure-Python wheel policy: the release workflow now sets STATGPU_NO_EXT=1, so the published wheel is tagged py3-none-any and installs on every OS / Python version. Previously python -m build compiled the optional Cython extensions during bdist_wheel, producing a platform-locked wheel (e.g. cp311-linux_x86_64) that served almost no one and forced everyone else onto the sdist.
  • setup.py: added the STATGPU_NO_EXT switch — when 1, ext_modules is empty (forces a pure-Python build). The Cython extensions remain optional CPU accelerators with pure-Python fallbacks; users who want the C speedups build them from the sdist (which ships .pyx/.pxd via MANIFEST.in).
  • publish.yml: added twine check dist/* before upload.

PR #74 — Ordered Newton-Raphson + Analytical Hessian Inference + Unified Sandwich Engine

  • Ordered Logit/Probit: L-BFGS replaced with Newton-Raphson + trust-region (3-backend)
  • Ordered inference: analytical Hessian, SE/z/p/CI, loglikelihood/aic/bic (CPU+GPU)
  • Sandwich engine: m_estimation_inference, fisher_information, penalty curvature API
  • Penalized inference: sandwich (L2/EN), oracle active-set (SCAD/MCP)
  • QuantileRegression standalone class with kernel+bootstrap inference
  • 28 bug fixes across 4 code review rounds; scipy→get_distribution; GPU guards
  • Docs: ordered.md rewrite, v0.2.1 coverage matrix, solver-algorithms/quantile/robust
  • Validated: R ordinal::clm, three-backend GPU (CuPy+Torch), 226 CI tests

中文

打包与 PyPI 发布(本版重点)

  • 纯 Python wheel 策略:发布 workflow 现在设置 STATGPU_NO_EXT=1,发布的 wheel 标记为 py3-none-any,可在任意 OS / Python 版本安装。此前 python -m build 会在 bdist_wheel 时编译可选 Cython 扩展,产出平台锁定 wheel(如 cp311-linux_x86_64),几乎无人可用且迫使其余用户回退 sdist。
  • setup.py:新增 STATGPU_NO_EXT 开关,置 1ext_modules 为空(强制纯 Python 构建)。Cython 扩展仍是可选 CPU 加速、带纯 Python 回退;需要 C 加速的用户从 sdist 构建(sdist 经 MANIFEST.in 携带 .pyx/.pxd)。
  • publish.yml:上传前新增 twine check dist/*

PR #74 — 有序 Newton-Raphson + 解析 Hessian 推断 + 统一三明治引擎

  • Ordered Logit/Probit:L-BFGS 替换为 Newton-Raphson + trust-region(三后端)
  • 有序推断:解析 Hessian、SE/z/p/CI、loglikelihood/aic/bic(CPU+GPU)
  • 三明治引擎:m_estimation_inferencefisher_information、penalty 曲率 API
  • 惩罚推断:sandwich(L2/EN)、oracle active-set(SCAD/MCP)
  • QuantileRegression 独立类,含 kernel+bootstrap 推断
  • 4 轮代码评审共 28 处 bug 修复;scipy→get_distribution;GPU guards
  • 文档:ordered.md 重写、v0.2.1 覆盖矩阵、solver-algorithms/quantile/robust
  • 验证:R ordinal::clm、三后端 GPU(CuPy+Torch)、226 项 CI 测试

Full Changelog: v0.2.0...v0.2.1