JuliaDiff / JuliaDiff/ReverseDiff.jl
Need better documentation/examples/error messages for using HessianConfig with DiffResult API
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 393
- Forks
- 60
- Avg merge
- 18h 24m
- Merged PRs (30d)
- 8
Description
The following works for gradient!():
using DiffBase, ReverseDiff
f(x) = sum(sin, x)+prod(tan, x)*sum(sqrt, x);
x = rand(4);
result = DiffBase.GradientResult(x);
rcfg = ReverseDiff.GradientConfig(x);
ReverseDiff.gradient!(result, f, x, rcfg);
DiffBase.value(result)
DiffBase.gradient(result)
However, the Hessian analogue of the above fails:
using DiffBase, ReverseDiff
f(x) = sum(sin, x)+prod(tan, x)*sum(sqrt, x);
x = rand(4);
result = DiffBase.HessianResult(x);
rcfg = ReverseDiff.HessianConfig(x);
ReverseDiff.hessian!(result, f, x, rcfg);
DiffBase.value(result)
DiffBase.gradient(result)
DiffBase.hessian(result)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the working GradientResult example and the failing HessianResult example using DiffBase and ReverseDiff, then inspect the documentation or examples covering HessianConfig and the DiffResult API. Done means the Hessian usage and resulting error behavior are clearly documented, with examples or error messages that explain the difference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100