Skip to content

docs: clarify PyTorch incomplete gamma gradient support - #181

Open
ayushibaidya wants to merge 1 commit into
frazane:mainfrom
ayushibaidya:docs/torch-gamma-gradient-support
Open

ayushibaidya wants to merge 1 commit into
frazane:mainfrom
ayushibaidya:docs/torch-gamma-gradient-support

Conversation

@ayushibaidya

Copy link
Copy Markdown

Summary

Clarifies PyTorch gradient support limitations for the incomplete gamma functions (gammainc, gammalinc, and gammauinc) in docs/special_functions_audit.md.

The existing support matrix marks Torch gradient support as PASS without specifying that differentiation with respect to the shape parameter is unsupported.

Changes

  • Clarified that PyTorch supports gradients with respect to the second argument of the underlying incomplete gamma functions, but not the first argument (shape parameter).
  • Documented the impact on crps_gamma, which cannot be differentiated with respect to the Gamma shape parameter using the Torch backend.
  • Preserved the existing support matrix and library behavior.

Validation

  • Reproduced the shape-parameter gradient failure using PyTorch 2.10.0 (NotImplementedError: the derivative for 'igamma: input' is not implemented).
  • Confirmed successful differentiation with respect to the second argument of torch.special.gammainc.
  • git diff --check — Passed.
  • uvx pre-commit run --all-files — All 5 checks passed.
  • Full test suite not run locally (documentation-only change).

No executable code was modified.

Fixes #146

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No torch gradient with respect to the gamma shape parameter

1 participant