Skip to content

[BREAKING] Clean up tests#470

Merged
gdalle merged 11 commits intomainfrom
gd/tests
Sep 19, 2024
Merged

[BREAKING] Clean up tests#470
gdalle merged 11 commits intomainfrom
gd/tests

Conversation

@gdalle
Copy link
Copy Markdown
Member

@gdalle gdalle commented Sep 18, 2024

Warning

Breaking changes: entire revamp of Scenario and other DIT functions.

DIT source

  • Change the type parameters and constructors of Scenario to accurately reflect the new terminology. We now have two distinctions:
    • in-place/out-of-place operators
    • in-place/out-of-place functions (no longer called 1-arg/2-arg functions due to the arrival of context arguments)
  • Rename the seed field of Scenario into tang to reflect the new Tangents typing
  • Let the Scenario constructor decide between y = f(x) and f!(y, x), based on whether y is passed or not
  • Remove specific constructors for each operator: GradientScenario becomes Scenario{:gradient}
  • Refactor and document scenario modificators.
  • Change the default_scenarios function to allow inclusion of batchified, closurified or constantified scenarios with just a kwarg (not public API yet). Here's the logic:
    1. First, batchified scenarios are added or not
    2. Then, batchified and standard scenarios together are closurified or constantified.
  • Remove filtering options in test_differentiation and benchmark_differentiation
  • Centralize and rename utility functions

DIT tests

  • Add some tests for scenarios whose correctness remained untested.

DI source

  • Fix sparse AD with contexts by putting them into a closure for sparsity pattern detection.

DI tests

  • Spread the load by splitting internals into several workflows

@gdalle gdalle marked this pull request as draft September 18, 2024 12:33
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 98.96552% with 3 lines in your changes missing coverage. Please review.

Project coverage is 98.50%. Comparing base (d51fc0a) to head (c4ac250).

Files with missing lines Patch % Lines
DifferentiationInterfaceTest/src/utils.jl 86.36% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #470      +/-   ##
==========================================
- Coverage   98.51%   98.50%   -0.01%     
==========================================
  Files         108      107       -1     
  Lines        4297     4291       -6     
==========================================
- Hits         4233     4227       -6     
  Misses         64       64              
Flag Coverage Δ
DI 98.57% <100.00%> (+<0.01%) ⬆️
DIT 98.37% <98.92%> (-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 linked an issue Sep 18, 2024 that may be closed by this pull request
@gdalle gdalle marked this pull request as ready for review September 18, 2024 14:50
@gdalle gdalle merged commit a1d9c26 into main Sep 19, 2024
@gdalle gdalle deleted the gd/tests branch September 19, 2024 07:03
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.

Fix contexts for sparse AD

2 participants