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 ADTypes sparsity detector #1134

Merged
merged 6 commits into from
Jun 3, 2024

Conversation

gdalle
Copy link
Contributor

@gdalle gdalle commented May 7, 2024

Following the release of ADTypes.jl v1.0, this PR adds a SymbolicsSparsityDetector struct that implements the new sparsity pattern detection framework.

  • Bump Symbolics version to 5.29.1
  • Add dependency on ADTypes (imported by SciMLBase anyway)
  • Define and export the SymbolicsSparsityDetector struct
  • Implement ADTypes.jacobian_sparsity and ADTypes.hessian_sparsity for general arrays, not just vectors
  • Add tests
  • Add documentation

@gdalle
Copy link
Contributor Author

gdalle commented May 7, 2024

@ChrisRackauckas this is part of the great wave of updates

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.94%. Comparing base (79c4e92) to head (07fdabd).
Report is 198 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1134      +/-   ##
==========================================
- Coverage   77.07%   75.94%   -1.13%     
==========================================
  Files          32       36       +4     
  Lines        3533     3692     +159     
==========================================
+ Hits         2723     2804      +81     
- Misses        810      888      +78     

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

@gdalle
Copy link
Contributor Author

gdalle commented May 7, 2024

@Vaibhavdixit02 I think the NonLinearSolve upgrade needs to come first before this one. Let me know if you need help

@gdalle
Copy link
Contributor Author

gdalle commented May 17, 2024

The only test failure that seems relevant is the downstream test with ModelingToolkit (https://github.com/JuliaSymbolics/Symbolics.jl/actions/runs/9127346950/job/25097459503?pr=1134).

I think it is happening because OptimizationBase has not yet fully embraced ADTypes v1.0 (see SciML/OptimizationBase.jl#44). @Vaibhavdixit02 what do you think?

@ChrisRackauckas
Copy link
Member

Can you rebase onto the depwarn fixes?

@gdalle
Copy link
Contributor Author

gdalle commented May 17, 2024

done

@gdalle
Copy link
Contributor Author

gdalle commented May 17, 2024

Not sure that was a great idea though, nearly all tests fail on master now 🤔

@ChrisRackauckas
Copy link
Member

@shashi is handling a big update over the next week, after which we will revisit this PR.

@gdalle
Copy link
Contributor Author

gdalle commented May 19, 2024

No rush!

@gdalle
Copy link
Contributor Author

gdalle commented May 27, 2024

Gentle bump on this one, it's absolutely non-destructive and would be useful for benchmarking

@ChrisRackauckas ChrisRackauckas merged commit 630b442 into JuliaSymbolics:master Jun 3, 2024
10 of 11 checks passed
@gdalle gdalle deleted the gd/adtypes branch June 3, 2024 13:43
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.

None yet

3 participants