Skip to content

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Jul 19, 2024

DIT extensions

  • Set up a Lux extension to define scenarios, modeled after the Flux one
  • Define the scenarios (out-of-place gradient with respect to parameters), their ground truth values (FiniteDifferences) and comparison functions (LuxTestUtils.check_approx)

DIT tests

  • Test Lux scenarios with one backend (Zygote)

DI tests

  • Set up a folder test/Down/Lux for Lux tests and add it to CI
  • Test Lux scenarios with one backend (Zygote)

See also:

@avik-pal
Copy link

avik-pal commented Jul 19, 2024

Gradient with respect to parameter only? Or parameter + state in a ComponentVector?

The latter won't work because state can contain non-array-like objects like Val.

Is Zygote the ground truth or Finite Differences?

Its Finite Differences (except in edge cases like Float16 testing where the error is quite high for finite differencing). I left more detailed comment on the issue on Lux

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.63%. Comparing base (2ee0b56) to head (a07ff9b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #372      +/-   ##
==========================================
+ Coverage   96.62%   96.63%   +0.01%     
==========================================
  Files         102      103       +1     
  Lines        4974     4996      +22     
==========================================
+ Hits         4806     4828      +22     
  Misses        168      168              

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

@gdalle gdalle marked this pull request as draft July 31, 2024 05:37
@gdalle gdalle marked this pull request as ready for review July 31, 2024 06:43
@gdalle gdalle merged commit a65f228 into main Jul 31, 2024
@gdalle gdalle deleted the gd/lux branch July 31, 2024 07:07
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.

3 participants