Skip to content

stop_mode='rel' seems to be ignored (solver iterates until 1e-5 despite 5% tolerance) #12

@QuietNoviceCoder

Description

@QuietNoviceCoder

Hi there,

I am encountering an issue where the solver does not seem to respect the stop_mode='rel' configuration.

I have configured get_deq with a relative tolerance of 0.05 (5%), aiming for a looser stop condition to speed up training. However, looking at the logs, the solver continues to iterate way past this threshold, only stopping when the error reaches the 1e-5 level (which looks like a default absolute tolerance).

Here is my configuration:

get_deq(
ift = True,
f_solver=deq_solver, # e.g., 'anderson'
b_solver=deq_solver,
f_max_iter=deq_f_max_iter,
b_max_iter=deq_b_max_iter,
f_tol=0.05, # Expecting stop at 5% relative error
b_tol=0.05,
stop_mode='rel',
f_anderson_m=deq_anderson_m if deq_solver == 'anderson' else None,
b_anderson_m=deq_anderson_m if deq_solver == 'anderson' else None,
)
Observed Behavior: Even though f_tol is set to 0.05 with stop_mode='rel', the solver does not terminate early. It keeps running until the residual drops to approximately 1e-5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions