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

fix: only evaluate required keys of varmap in process_SciMLProblem #3156

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

AayushSabharwal
Copy link
Member

Close #3153

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

Additional context

Add any other context about the problem here.

@isaacsas
Copy link
Member

Has this been tested against catalyst to ensure it won’t break stuff? Note that CI here is not currently doing such a test.

@isaacsas
Copy link
Member

(Because of BifurcationKit not getting updated yet.)

@ChrisRackauckas
Copy link
Member

Why wouldn't the downstream test be sufficient on all?

Also, Catalyst doesn't use this function at all https://github.com/search?q=repo%3ASciML%2FCatalyst.jl%20evaluate_varmap!&type=code

@AayushSabharwal
Copy link
Member Author

Additionally, this was the behavior of the *Problem constructors before the cleanup anyway. I changed to evaluating the entire varmap because it seemed cleaner to do it once and use the "finalized" varmap everywhere but didn't know of the edge case in the linked issue.

@AayushSabharwal
Copy link
Member Author

I'll test master against catalyst, though, because of #3155

@isaacsas
Copy link
Member

@ChrisRackauckas Just look at the integration test on Catalyst here — it didn’t actually run due to the bifurcation kit version incompatibility.

I will remove that extension from Catalyst later today until someone can update it (to get downstream testing here working again). More generally though, this issue is part of why I wanted to move extensions to separate libs.

@isaacsas
Copy link
Member

@AayushSabharwal ok, thanks for explaining. Just didn’t want to break the conservation law handling in problem construction suddenly. If this was the old behavior it should be fine.

@AayushSabharwal
Copy link
Member Author

I can't get Catalyst tests to run. Artificially lowering BifurcationKit compat doesn't work, and neither does removing the extension altogether.

@isaacsas
Copy link
Member

Ok, I’ll see what is going on when I’m at work later, and get Catalyst master working with downstream here again. I’m not sure why removing BifurcationKit from the Project.toml and testing isn’t sufficient.

@ChrisRackauckas
Copy link
Member

Okay, since Catalyst does not use this function and it's reverting to an older behavior, I'm going to merge. I'm confused why Catalyst is brought up here in the first place, though we should fix that extension, I do not understand why the concern on a function it doesn't use?

@ChrisRackauckas ChrisRackauckas merged commit fa14fdd into SciML:master Oct 28, 2024
35 of 39 checks passed
@AayushSabharwal AayushSabharwal deleted the as/varmap-partial-eval branch October 28, 2024 08:24
@isaacsas
Copy link
Member

Every *Problem is built via that function. I was concerned changing the initialization in this way could break something we rely on (like conserved constant initialization). if it is the old behavior it should be fine.

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.

ifelse in equations can produce error for ODEProblem
3 participants