Skip to content

Commit 2b641a9

Browse files
Fix module reference errors in missing physics example
The example had incorrect module references that prevented it from running: - Line 273: `ODE.solve` should be `OPT.solve` for optimization - Line 495: `Optimization.OptimizationFunction` should be `OPT.OptimizationFunction` - Line 496: `Optimization.OptimizationProblem` should be `OPT.OptimizationProblem` - Line 497: `Optimization.OPT.solve` should be `OPT.solve` - Line 497: `Optim.LBFGS()` should be `OptimizationOptimJL.LBFGS()` These were typos introduced during the module aliasing refactor. The example now runs correctly with just these minimal fixes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2a112d7 commit 2b641a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/showcase/missing_physics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Thus we first solve the optimization problem with ADAM. Choosing a learning rate
270270
(tuned to be as high as possible that doesn't tend to make the loss shoot up), we see:
271271

272272
```@example ude
273-
res1 = ODE.solve(
273+
res1 = OPT.solve(
274274
optprob, OptimizationOptimisers.Adam(), callback = callback, maxiters = 5000)
275275
println("Training loss after $(length(losses)) iterations: $(losses[end])")
276276
```
@@ -488,9 +488,9 @@ function parameter_loss(p)
488488
sum(abs2, Ŷ .- Y)
489489
end
490490
491-
optf = Optimization.OptimizationFunction((x, p) -> parameter_loss(x), adtype)
492-
optprob = Optimization.OptimizationProblem(optf, DataDrivenDiffEq.get_parameter_values(nn_eqs))
493-
parameter_res = Optimization.OPT.solve(optprob, Optim.LBFGS(), maxiters = 1000)
491+
optf = OPT.OptimizationFunction((x, p) -> parameter_loss(x), adtype)
492+
optprob = OPT.OptimizationProblem(optf, DataDrivenDiffEq.get_parameter_values(nn_eqs))
493+
parameter_res = OPT.solve(optprob, OptimizationOptimJL.LBFGS(), maxiters = 1000)
494494
```
495495

496496
## Simulation

0 commit comments

Comments
 (0)