Skip to content

Commit efd914f

Browse files
committedJan 16, 2025
Reset linesearch_step when switching from half to full projectors
1 parent d9ab3e3 commit efd914f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎varipeps/optimization/optimizer.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ def random_noise(a):
717717
working_gradient = None
718718
signal_reset_descent_dir = True
719719
conv = jnp.inf
720+
linesearch_step = None
720721

721722
if conv < varipeps_config.optimizer_convergence_eps:
722723
working_value, (
@@ -754,7 +755,7 @@ def random_noise(a):
754755
"Energy": f"{working_value:0.10f}",
755756
"Retries": random_noise_retries,
756757
"Convergence": f"{conv:0.8f}",
757-
"Line search step": f"{linesearch_step:0.8f}",
758+
"Line search step": f"{linesearch_step:0.8f}" if linesearch_step is not None else "0",
758759
"Max. trunc. err.": f"{max_trunc_error:0.8g}",
759760
}
760761
)

0 commit comments

Comments
 (0)
Please sign in to comment.