JuliaDiff / JuliaDiff/DifferentiationInterface.jl
copy method for prep objects
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 313
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Please add copy method for prep objects if that is feasible.
Rationale: no need to invoke prepare_... methods again, which require (at least the type of) the original x which would then need to be kept, for no other reason.
Specifically, I want to use it in LogDensityProblemsAD.jl, our current implementation is not thread-safe since copy falls back to a no-op.
Contributor guide
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 reading the prep-object implementations and the prepare_... methods, then inspect ext/LogDensityProblemsADDifferentiationInterfaceExt.jl in the linked LogDensityProblemsAD implementation. Determine how copying is currently handled and what preparation state must be independent for thread safety; done means prep objects can be copied without rerunning preparation or falling back to a no-op.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100