Skip to content

Commit

Permalink
Always use the fast mode during the initial exploration
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Jan 25, 2025
1 parent bc6d0a2 commit 124414e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jafit/jafit.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def do_fit(
x_max=x_max,
obj_fn=make_objective_function(
ref, # Here we're using the non-interpolated curve.
lambda c: solve(model, c, H_stop, fast=fast),
lambda c: solve(model, c, H_stop, fast=True), # The initial exploration always uses the fast mode.
loss.demag_key_points,
stop_loss=0.01, # Fine adjustment is meaningless the loss fun is crude here.
stop_evals=max_evaluations_per_stage,
Expand Down Expand Up @@ -227,7 +227,7 @@ def do_fit(
x_max=x_max,
obj_fn=make_objective_function(
ref_interpolated,
lambda c: solve(model, c, H_stop),
lambda c: solve(model, c, H_stop), # Fine-tuning cannot use fast mode.
loss.nearest,
stop_evals=max_evaluations_per_stage,
callback=make_callback("2_local", ref_interpolated, plot_failed=plot_failed),
Expand Down

0 comments on commit 124414e

Please sign in to comment.