JuliaDiff / JuliaDiff/ChainRulesTestUtils.jl
API testing only mode?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 50
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
It might be useful to have a flag to only use the API testing features of test_frule/test_rrule without using finite differencing to check values.
Use cases:
- Your primal problem is unfriendly to finite differencing (e.g. too discontinuous, or has hard to deal with input domain requirements)
- You test correctness on one type, and you want faster tests that it doesn't error for a bunch of others (trading off confidence in your tests for speed)
- Your rule intentionally lies about it's gradient (e.g. something like gradient clipping could be implemented as
rrule(:typeof(gradient_clip), x, clip) = x, dy -> (NoTangent(), clamp(dy, -clip, clip), Zero()))
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 with the test_frule and test_rrule entry points to understand how finite-difference checks are invoked. Define the flag's behavior for API-only validation, including the listed use cases, and add coverage showing that it skips finite differencing while still checking the API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100