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

Various interface changes and minor performance improvements #24

Merged
merged 12 commits into from
Apr 3, 2024

Conversation

nicholaskl97
Copy link
Collaborator

@nicholaskl97 nicholaskl97 commented Mar 29, 2024

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Changes

Various interface/performance changes, including:

  • Added name keyword to NeuralLyapunovPDESystem and removed neural network function output for that function (so now it only outputs a PDESystem)
  • Moved NumericalNeuralLyapunovFunctions to its own file and renamed it get_numerical_lyapunov_function; combined methods into one and changed parameter input (now takes res.u.depvar instead of res.u)
  • Changed documentation from indicitave to imperative mood
  • Changed relu keyword to rectifier
  • Changed pendulum parameters in tests to match convention
  • Modified tests to improve code coverage (damped_sho.jl now uses ExponentialDecrease and damped_pendulum.jl now uses a softplus-like rectifier)

Additionally, cleaned up local_Lyapunov (now local_lyapunov):

  • Renamed
  • Added a test
  • Removed its $\nabla V$ output
  • Changed its $\dot{V}$ calculation
  • Split different Jacobian handling into separate methods

@nicholaskl97
Copy link
Collaborator Author

Changes to NumericalNeuralLyapunovFunctions (now get_numerical_lyapunov_function) include closer adherence to best practices for closures, partially addressing #19.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 76.63%. Comparing base (a4d1793) to head (7e1a4c6).
Report is 3 commits behind head on master.

Files Patch % Lines
src/numerical_lyapunov_functions.jl 81.48% 5 Missing ⚠️
src/decrease_conditions.jl 60.00% 2 Missing ⚠️
src/NeuralLyapunovPDESystem.jl 75.00% 1 Missing ⚠️
src/minimization_conditions.jl 0.00% 1 Missing ⚠️
src/policy_search.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master      #24       +/-   ##
===========================================
+ Coverage   66.25%   76.63%   +10.38%     
===========================================
  Files           9       10        +1     
  Lines         243      244        +1     
===========================================
+ Hits          161      187       +26     
+ Misses         82       57       -25     

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

@nicholaskl97 nicholaskl97 marked this pull request as ready for review March 29, 2024 23:45
@nicholaskl97 nicholaskl97 merged commit 5e32f69 into master Apr 3, 2024
4 of 5 checks passed
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.

1 participant