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 / torchEnglish
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 taggedpy3-none-anyand installs on every OS / Python version. Previouslypython -m buildcompiled the optional Cython extensions duringbdist_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_EXTswitch — when1,ext_modulesis 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/.pxdviaMANIFEST.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)
QuantileRegressionstandalone 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开关,置1时ext_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_inference、fisher_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