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

make outputsize work with symbolically wrapped lux models #1508

Merged
merged 3 commits into from
Mar 29, 2025

Conversation

SebastianM-C
Copy link
Contributor

I'm trying to make the Lux model in MTKNN a parameter, but we need to call LuxCore.outputsize to get the size for symbolic registration. The issue is that in the registered function we get a SymbolicUtils.BasicSymbolic{<:LuxCore.AbstractLuxLayer}, but there are not methods that work with that in LuxCore since we need to hit a AbstractLuxLayer

LuxCore.outputsize(layer::AbstractLuxLayer, x, rng::AbstractRNG)

We can't register LuxCore.outputsize since that would give us a Num as a result of the size calculation. Is this a good solution?

@SebastianM-C SebastianM-C changed the title make outputsize work with symbolically wrapped lux models make outputsize work with symbolically wrapped lux models Mar 27, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 27, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.42%. Comparing base (9df148a) to head (7dfe7d9).
Report is 87 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    #1508       +/-   ##
===========================================
+ Coverage    8.79%   80.42%   +71.63%     
===========================================
  Files          51       51               
  Lines        4924     5078      +154     
===========================================
+ Hits          433     4084     +3651     
+ Misses       4491      994     -3497     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

SebastianM-C and others added 2 commits March 27, 2025 17:07
@SebastianM-C
Copy link
Contributor Author

SebastianM-C commented Mar 27, 2025

The test failure is because CellMLToolkit doesn't declare a compat on Symbolics (and is the same as master) 😅

@SebastianM-C
Copy link
Contributor Author

@ChrisRackauckas is this good to go?

@ChrisRackauckas ChrisRackauckas merged commit 4d63265 into JuliaSymbolics:master Mar 29, 2025
15 of 16 checks passed
@SebastianM-C SebastianM-C deleted the outputsize branch March 29, 2025 20:42
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

4 participants