Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better scenarios with weird arrays #523

Merged
merged 16 commits into from
Oct 1, 2024
Merged

Better scenarios with weird arrays #523

merged 16 commits into from
Oct 1, 2024

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Oct 1, 2024

DI source

  • Remove modification of y once passed to a Scenario with in-place function f!

DIT extensions

  • JLArrays: conversion of every ingredient of a scenario to a JLArray
  • StaticArrays: conversion of every ingredient of a scenario to a SArray or MArray
  • Both: convert the output of default_scenarios() instead of recreating it

DI extensions

  • ForwardDiff and ReverseDiff:
    • improve handling of StaticArrays by using DiffResult instead of MutableDiffResult whenever possible
    • copy the derivatives back into provided storage only if the memory addresses differ (hope this is cheap)
  • ReverseDiff: deal with DiffResults objects are not re-aliased properly ReverseDiff.jl#251, which causes issues because the gradient is not updated properly during a hessian for example

DI tests

  • Remove testing of Zygote on static arrays

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 98.58156% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.60%. Comparing base (e716262) to head (7c5cd81).

Files with missing lines Patch % Lines
...ferentiationInterfaceTest/src/scenarios/default.jl 86.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #523   +/-   ##
=======================================
  Coverage   98.60%   98.60%           
=======================================
  Files         106      106           
  Lines        4578     4593   +15     
=======================================
+ Hits         4514     4529   +15     
  Misses         64       64           
Flag Coverage Δ
DI 98.73% <100.00%> (+0.01%) ⬆️
DIT 98.33% <96.87%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle gdalle marked this pull request as ready for review October 1, 2024 10:31
@gdalle gdalle merged commit cee3e4e into main Oct 1, 2024
75 checks passed
@gdalle gdalle deleted the gd/testarrays branch October 1, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants