Skip to content

Commit

Permalink
Add verbose print statement for convergence reason
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Mar 18, 2024
1 parent 97ee2b9 commit 2992de9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bnpm/automatic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,11 @@ def fit(self) -> Union[sklearn.base.BaseEstimator, Optional[Dict[str, Any]]]:
callbacks=callbacks,
n_trials=self.kwargs_convergence['max_trials'],
show_progress_bar=self.verbose,
)
)

# Print reason for convergence
if self.verbose > 0:
print(f'Convergence reason: {self.checker.reason_converged}')

# Retrieve the best parameters and the best model
self.best_params = self.study.best_params
Expand Down

0 comments on commit 2992de9

Please sign in to comment.