Skip to content

Commit

Permalink
no abbreviations
Browse files Browse the repository at this point in the history
  • Loading branch information
vroulet committed Oct 19, 2023
1 parent 2a3fbc6 commit ba72a61
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion jaxopt/_src/anderson_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def use_param(t):
residual_gram=residual_gram)

if self.verbose:
self.log_info(next_state, error_name="Inner Solver Err.")
self.log_info(next_state, error_name="Inner Solver Error")
return base.OptStep(params=next_params, state=next_state)

def optimality_fun(self, params, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions jaxopt/_src/armijo_sgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ def update(self, params, state, *args, **kwargs) -> base.OptStep:
if self.verbose:
self.log_info(
next_state,
error_name="Grad. Norm",
error_name="Gradient Norm",
additional_info={
'Obj. Val.': next_state.value,
'Objective Value': next_state.value,
'Stepsize': stepsize
},
)
Expand Down
8 changes: 4 additions & 4 deletions jaxopt/_src/backtracking_linesearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ def update(
num_grad_eval=num_grad_eval)

if self.verbose:
additional_info = {'Stepsize': stepsize, 'Obj. Val.': new_value}
additional_info = {'Stepsize': stepsize, 'Objective Value': new_value}
if self.condition != 'armijo':
error_name = "Min. Decr. & Curv. Err."
additional_info.update({'Decr. Err.': error_cond1})
error_name = "Minimum Decrease & Curvature Errors"
additional_info.update({'Decrease Error': error_cond1})
else:
error_name = "Decr. Err."
error_name = "Decrease Error"
self.log_info(
new_state,
error_name=error_name,
Expand Down
6 changes: 3 additions & 3 deletions jaxopt/_src/bfgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ def update(self,
if self.verbose:
self.log_info(
new_state,
error_name="Grad. Norm",
error_name="Gradient Norm",
additional_info={
"Obj. Val.": new_value,
"Objective Value": new_value,
"Stepsize": new_stepsize,
"Num. Linesearch Iter.":
"Number Linesearch Iterations":
new_state.num_linesearch_iter - state.num_linesearch_iter
}
)
Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/bisection.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def update(self,
if self.verbose:
self.log_info(
state,
error_name="Abs. Val. Output",
error_name="Absolute Value Output",
additional_info={
"High Point": high,
"Low Point": low
Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/block_cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def body_fun(i, tup):
if self.verbose:
self.log_info(
state,
error_name="Dist. btw Iterates"
error_name="Distance btw Iterates"
)
return base.OptStep(params=params, state=state)

Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/broyden.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def ls_fun_with_aux(params, *args, **kwargs):
error_name="Norm Output",
additional_info={
"Stepsize": new_stepsize,
"Num. Linesearch Iter.":
"Number Linesearch Iterations":
new_state.num_linesearch_iter - state.num_linesearch_iter
}
)
Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/fixed_point_iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def update(self,
if self.verbose:
self.log_info(
next_state,
error_name="Dist. btw Iterates"
error_name="Distance btw Iterates"
)
return base.OptStep(params=next_params, state=next_state)

Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/gauss_newton.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def update(self,
self.log_info(
state,
error_name="Norm GN Update",
additional_info={"Obj. Val.": value}
additional_info={"Objective Value": value}
)
return base.OptStep(params=params, state=state)

Expand Down
4 changes: 2 additions & 2 deletions jaxopt/_src/hager_zhang_linesearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ def _reupdate():
if self.verbose:
self.log_info(
new_state,
error_name="Min. Decr. & Curv. Err.",
error_name="Minimum Decrease & Curvature Errors",
additional_info={
"Stepsize": new_stepsize,
"Obj. Val.": new_value
"Objective Value": new_value
}
)

Expand Down
6 changes: 3 additions & 3 deletions jaxopt/_src/lbfgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,11 @@ def update(self,
if self.verbose:
self.log_info(
new_state,
error_name="Grad. Norm",
error_name="Gradient Norm",
additional_info={
"Obj. Val.": new_value,
"Objective Value": new_value,
"Stepsize": new_stepsize,
"Num. Linesearch Iter.":
"Number Linesearch Iterations":
new_state.num_linesearch_iter - state.num_linesearch_iter
}
)
Expand Down
6 changes: 3 additions & 3 deletions jaxopt/_src/lbfgsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,11 @@ def update(
if self.verbose:
self.log_info(
new_state,
error_name="Proj. Grad. Norm",
error_name="Projected Gradient Norm",
additional_info={
"Obj. Val.": new_value,
"Objective Value": new_value,
"Stepsize": new_stepsize,
"Num. Linesearch Iter.":
"Number Linesearch Iterations":
new_state.num_linesearch_iter - state.num_linesearch_iter
}
)
Expand Down
6 changes: 3 additions & 3 deletions jaxopt/_src/levenberg_marquardt.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ def update(self, params, state: NamedTuple, *args, **kwargs) -> base.OptStep:
if self.verbose:
self.log_info(
state,
error_name="Grad. Norm",
error_name="Gradient Norm",
additional_info={
"Obj. Val.": new_value,
"Damp. Factor": damping_factor
"Objective Value": new_value,
"Damping Factor": damping_factor
}
)
return base.OptStep(params=params, state=state)
Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/mirror_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _update(self, x, state, hyperparams_proj, args, kwargs):
if self.verbose:
self.log_info(
next_state,
error_name="Dist. btw Iterates"
error_name="Distance btw Iterates"
)
return base.OptStep(params=next_x, state=next_state)

Expand Down
6 changes: 3 additions & 3 deletions jaxopt/_src/nonlinear_cg.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ def update(self,
if self.verbose:
self.log_info(
new_state,
error_name="Grad. Norm",
error_name="Gradient Norm",
additional_info={
"Obj. Val.": new_value,
"Objective Value": new_value,
"Stepsize": new_stepsize,
"Num. Linesearch Iter.":
"Number Linesearch Iterations":
new_state.num_linesearch_iter - state.num_linesearch_iter
}
)
Expand Down
4 changes: 2 additions & 2 deletions jaxopt/_src/optax_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def update(self,
if self.verbose:
self.log_info(
new_state,
error_name="Grad. Norm",
additional_info={"Obj. Value": value}
error_name="Gradient Norm",
additional_info={"Objective Value": value}
)
return base.OptStep(params=params, state=new_state)

Expand Down
4 changes: 2 additions & 2 deletions jaxopt/_src/polyak_sgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ def update(self,
if self.verbose:
self.log_info(
new_state,
error_name="Grad. Norm",
error_name="Gradient Norm",
additional_info={
"Obj. Val.": value,
"Objective Value": value,
"Stepsize": stepsize,
}
)
Expand Down
2 changes: 1 addition & 1 deletion jaxopt/_src/proximal_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def _update_accel(self, x, state, hyperparams_prox, args, kwargs):
if self.verbose:
self.log_info(
next_state,
error_name="Dist. btw Iterates",
error_name="Distance btw Iterates",
additional_info={
"Stepsize": next_stepsize
}
Expand Down
6 changes: 3 additions & 3 deletions jaxopt/_src/zoom_linesearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,11 +813,11 @@ def _cond_fun(self, inputs):
def _log_info(self, state, stepsize):
self.log_info(
state,
error_name="Min. Decr. & Curv. Err.",
error_name="Minimum Decrease & Curvature Errors",
additional_info={
"Stepsize": stepsize,
"Decr. Err.": state.decrease_error,
"Curv. Err.": state.curvature_error
"Decrease Error": state.decrease_error,
"Curvature Error": state.curvature_error
}
)

Expand Down

0 comments on commit ba72a61

Please sign in to comment.