-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better tracking of n_iters
#436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -329,6 +330,7 @@ class SinkhornOutput(NamedTuple): | |||
threshold: Optional[jnp.ndarray] = None | |||
converged: Optional[bool] = None | |||
inner_iterations: Optional[int] = None | |||
n_iters: int = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am wondering if we need to keep inner_iterations
now (it was added to compute the right number of iterations), WDYT? I think it might make sense to keep it nonetheless (e.g. when looking at errors
), maybe this was your conclusion too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be safely removed, was not being used anywhere and I don't think it helps when looking at the errors
. Same goes for threshold
, would also remove.
Will try in the upcoming weeks to unify the output interface for our problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or was/is there a reason why threshold
was put there before? Maybe because of traceability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threshold
is there to settle converged
in the case where min_iterations==max_iterations
. It was added specifically for that case.
For inner_iterations
, i think we should have the user in mind. If the user saves a SinkhornOutput
as a checkpoint, it's impossible to reconstruct the "true" number of iterations that were needed to reach a certain error level, nor the threshold
that conditioned stopping (apart maybe now by looking at last error not marked as -1, and then divide now n_iters
by that number, but that does sound very clean)
closes #434