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

Revamp test scenarios #323

Merged
merged 12 commits into from
Jun 18, 2024
Merged

Revamp test scenarios #323

merged 12 commits into from
Jun 18, 2024

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Jun 18, 2024

Versions

  • BREAKING: bump DIT to v0.5.0

DIT source

  • BREAKING: AbstractScenario disappears, replaced by a concrete type Scenario with more flexibility. It stores the operator results directly, instead of a ref closure.
  • BREAKING: The specific scenarios like GradientScenario are just constructors and not types anymore. Their signature changes to be more explicit.
  • BREAKING: test_differentiation no longer accepts ref_backend, and its excluded kwarg must be a Vector{Symbol} now.
  • BREAKING: benchmark_differentiation directly returns a DataFrame
  • Re-organize default scenario definitions to shorten the code. Avoid closures for num_to_arr
  • Adjust GPU, component and static scenarios. The latter has become more coherent (SArrays everywhere for 1-arg, MArrays for 2-arg) and it caught a bug in ForwardDiff.
  • Define allocfree_scenarios for functions which shouldn't cause any allocations

DIT tests

  • Improve AutoZero tests with the internal function scenario_to_zero
  • Add tests on Zygote backend

DI extensions

  • Fix bug with ForwardDiff value_gradient_and_hessian on SArrays, by using a HessianResult(x) instead of the handcrafted MutableDiffResult

DI tests

  • Temporarily remove ForwardDiff efficiency tests, will reintroduce them later with allocfree_scenarios
  • Adjust excluded kwarg to test_differentiation, which now requires Symbols

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 99.23195% with 5 lines in your changes missing coverage. Please review.

Project coverage is 96.48%. Comparing base (cb4605a) to head (b00c04f).

Files Patch % Lines
...erentiationInterfaceTest/src/scenarios/scenario.jl 94.59% 2 Missing ⚠️
...entiationInterfaceTest/src/test_differentiation.jl 88.23% 2 Missing ⚠️
...ferentiationInterfaceTest/src/scenarios/default.jl 99.40% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
+ Coverage   96.04%   96.48%   +0.43%     
==========================================
  Files          95       95              
  Lines        4403     4435      +32     
==========================================
+ Hits         4229     4279      +50     
+ Misses        174      156      -18     

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

@gdalle gdalle merged commit 004e934 into main Jun 18, 2024
53 checks passed
@gdalle gdalle deleted the gd/scenarios branch June 18, 2024 18:50
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