File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,13 +221,14 @@ def solve(
221221 )
222222 except InvalidValueFunctionError as exc :
223223 if log_path is not None and exc .partial_solution is not None :
224- save_solve_snapshot (
224+ snap_dir = save_solve_snapshot (
225225 model = self ,
226226 params = params ,
227227 period_to_regime_to_V_arr = exc .partial_solution , # ty: ignore[invalid-argument-type]
228228 log_path = Path (log_path ),
229229 log_keep_n_latest = log_keep_n_latest ,
230230 )
231+ exc .add_note (f"Snapshot saved to { snap_dir } " )
231232 raise
232233 if log_level == "debug" and log_path is not None :
233234 save_solve_snapshot (
@@ -331,13 +332,14 @@ def simulate(
331332 )
332333 except InvalidValueFunctionError as exc :
333334 if log_path is not None and exc .partial_solution is not None :
334- save_solve_snapshot (
335+ snap_dir = save_solve_snapshot (
335336 model = self ,
336337 params = params ,
337338 period_to_regime_to_V_arr = exc .partial_solution , # ty: ignore[invalid-argument-type]
338339 log_path = Path (log_path ),
339340 log_keep_n_latest = log_keep_n_latest ,
340341 )
342+ exc .add_note (f"Snapshot saved to { snap_dir } " )
341343 raise
342344 result = simulate (
343345 internal_params = internal_params ,
You can’t perform that action at this time.
0 commit comments