Skip to content

Conversation

@AayushSabharwal
Copy link
Member

@AayushSabharwal AayushSabharwal commented Jan 21, 2025

@AayushSabharwal
Copy link
Member Author

The updated initialization was causing problems for linearization. #3348 already fixed initialization in linearization_function so hacking something here only for it to be overwritten is pointless. #3348 is now merged into this PR.

@AayushSabharwal
Copy link
Member Author

The challenge is now remake. prob2 = remake(prob; u0 = [x => 1.0]) rebuilds the initialization problem appropriately, but doesn't set Initial(x) to 1.0 in prob2, which causes initialization to use whatever value is already in there. I don't think we can do this update in remake_initialization_data in MTK either, since what if the user does [x => ForwardDiff.Dual(1.0)]? The parameter object will still store Initial(x) as a Float64 and we'll get a MethodError trying to convert between the two.

@AayushSabharwal
Copy link
Member Author

Requires SciML/SciMLBase.jl#926

@AayushSabharwal
Copy link
Member Author

AayushSabharwal commented Feb 10, 2025

This makes tests in the global test environment run locally 🥳. I haven't run anything requiring its own environment (Downstream/etc) because linearization needs updates to use Initial. There's also something that works but seems incorrect which I'm working on investigating.

@AayushSabharwal AayushSabharwal merged commit e8ccbbe into SciML:master Feb 14, 2025
33 of 44 checks passed
@AayushSabharwal AayushSabharwal deleted the as/init-no-ts branch February 14, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment