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

Add static tests with JET #45

Merged
merged 6 commits into from
Apr 21, 2023
Merged

Add static tests with JET #45

merged 6 commits into from
Apr 21, 2023

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Apr 20, 2023

JET.jl enables static testing of code correctness, it's good to catch typos among other things. We could also use it to test for dynamic dispatch (although I'm sure the Frank-Wolfe part is ripe with it)

I had to remove the generic methods throwing errors, and replace them with empty functions. It's better style anyway.
However, this leads JET to assume that no method exists for compute_maximizer(base_loss, θ, α, y_true) in the SSVM. As a result, I switched the analysis to :typo mode for now instead of the more complete version. I opened an issue to keep track of this: aviatesk/JET.jl#495

Tests might fail on Julia 1.10 because of a bug in Zygote: FluxML/Zygote.jl#1410

@gdalle gdalle added the enhancement New feature or request label Apr 20, 2023
@gdalle gdalle linked an issue Apr 20, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: +3.90 🎉

Comparison is base (7e65548) 88.97% compared to head (f057e5a) 92.87%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
+ Coverage   88.97%   92.87%   +3.90%     
==========================================
  Files          19       21       +2     
  Lines         408      519     +111     
==========================================
+ Hits          363      482     +119     
+ Misses         45       37       -8     
Impacted Files Coverage Δ
src/imitation_loss/imitation_loss.jl 100.00% <ø> (+4.34%) ⬆️
src/ssvm/isbaseloss.jl 100.00% <ø> (+100.00%) ⬆️

... and 18 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gdalle gdalle merged commit b1d164c into main Apr 21, 2023
@gdalle gdalle deleted the jet branch April 21, 2023 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JET.test_package to test suite
2 participants