From 0026095119ab40194300b5cf0981509e539f202b Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 24 Dec 2023 19:08:47 -0500 Subject: [PATCH] Update docs/src/getting_started/fit_simulation.md --- docs/src/getting_started/fit_simulation.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/getting_started/fit_simulation.md b/docs/src/getting_started/fit_simulation.md index 8587ec7cb11..f2a70f72c04 100644 --- a/docs/src/getting_started/fit_simulation.md +++ b/docs/src/getting_started/fit_simulation.md @@ -305,8 +305,9 @@ callback( ) ``` -In this case, we will provide the callback the arguments `(_, l, sol)`, -since there are no additional optimization function parameters. +In this case, we will provide the callback the arguments `(p, l, sol)`, +since it always takes the current state of the optimization first (`p`) +then the returns from the loss function (`l, sol`). The return value of the callback function should default to `false`. `Optimization.solve` will halt if/when the callback function returns `true` instead. Typically the `return` statement would monitor the loss value