fax icon indicating copy to clipboard operation
fax copied to clipboard

convergence_test function signature

Open manuel-delverme opened this issue 5 years ago • 3 comments

The convergence_test function is uses new_parameters, old_parameters as arguments: e.g. https://github.com/gehring/fax/blob/15619388f9362d6365eabf074ad27b50cf08d8fd/fax/constrained/constrained_test.py#L60

but in the doc string it accepts the solution tuple: https://github.com/gehring/fax/blob/1c68fc6745c5831bb55fa1e914f3de5efac85e51/fax/loop.py#L58 which includes other values such as the number of iterations.

which of the two is the proper argument?

manuel-delverme avatar Jun 05 '20 09:06 manuel-delverme

Thanks for pointing that out. I think the problem is that the use of the word "solution" is ambiguous given we define a FixedPointSolution namedtuple. Those docs were written when we wrote the fixed point iteration solver and use "solution" to mean the fixed point of the function.

All that the default convergence test really does is check if arrays inside two pytrees are close to each other with a some convenience features (like adjusting tolerances for low precision floats).

gehring avatar Jun 05 '20 20:06 gehring

Is this addressed in #30 ? Can it be closed?

pierrelux avatar Aug 01 '20 16:08 pierrelux

No, the docs still use the same language. We should change the word solution to something more specific.

gehring avatar Aug 01 '20 16:08 gehring