-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Does using tdqm here could be a solution to see how the optim is going ?
from tqdm import tqdm
def _solve_frame_per_frame(
self,
Q_init,
initial_guess_mode,
method,
options,
):
Qopt = np.zeros((12 * self.model.nb_segments, self.nb_frames))
nlp = self._setup_nlp()
self.objective_function = np.zeros(self.nb_frames)
# Wrap your loop with tqdm
for f in tqdm(range(self.nb_frames), desc="Processing frames"):
nlp["f"] = self._get_objective_for_frame(f)
r, success = self._solve_single_frame(method, nlp, Q_init[:, f], options)
Qopt[:, f : f + 1] = r["x"].toarray()
self.objective_function[f] = r["f"]
Q_init = self._update_initial_guess(Q_init, Qopt, initial_guess_mode, f)
return QopTell me if good idea ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels