Skip to content

Commit

Permalink
Make Flux scenarios private in DIT (#364)
Browse files Browse the repository at this point in the history
* Relax Flux tests in DIT

* Keep Flux scenarios private

* Add Flux tests on pre-release
  • Loading branch information
gdalle authored Jul 17, 2024
1 parent f4ba734 commit 37d404a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ jobs:
group: Back/SecondOrder
- version: 'pre'
group: Down/Detector
- version: 'pre'
group: Down/Flux

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion DifferentiationInterface/test/Down/Flux/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test_differentiation(
AutoZygote(),
# AutoEnzyme() # TODO: fix
],
flux_scenarios();
DIT.flux_scenarios();
isequal=DIT.flux_isequal,
isapprox=DIT.flux_isapprox,
rtol=1e-2,
Expand Down
3 changes: 2 additions & 1 deletion DifferentiationInterfaceTest/docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ DifferentiationBenchmarkDataRow

## Pre-made scenario lists

The precise contents of the scenario lists are not part of the API, only their existence.

```@docs
default_scenarios
sparse_scenarios
component_scenarios
gpu_scenarios
static_scenarios
flux_scenarios
```

## Scenario types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,5 @@ export DifferentiationBenchmarkDataRow
export static_scenarios
export component_scenarios
export gpu_scenarios
export flux_scenarios

end
4 changes: 4 additions & 0 deletions DifferentiationInterfaceTest/src/scenarios/extensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Create a vector of [`Scenario`](@ref)s with neural networks from [Flux.jl](https
!!! warning
This function requires Flux.jl and FiniteDifferences.jl to be loaded (it is implemented in a package extension).
!!! danger
These scenarios are still experimental and not part of the public API.
Their ground truth values are computed with finite differences, and thus subject to imprecision.
"""
function flux_scenarios end

Expand Down
6 changes: 3 additions & 3 deletions DifferentiationInterfaceTest/test/weird.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ test_differentiation(

test_differentiation(
AutoZygote(),
flux_scenarios();
DIT.flux_scenarios();
isequal=DIT.flux_isequal,
isapprox=DIT.flux_isapprox,
rtol=1e-2,
atol=1e-3,
rtol=5e-2,
atol=1e-2,
logging=LOGGING,
)

0 comments on commit 37d404a

Please sign in to comment.