diff --git a/mellea/stdlib/sampling.py b/mellea/stdlib/sampling.py index c1dd7538..c5ef33ce 100644 --- a/mellea/stdlib/sampling.py +++ b/mellea/stdlib/sampling.py @@ -150,6 +150,10 @@ def sample( flog = FancyLogger.get_logger() + # The `logging_redirect_tqdm` approach did not work, so instead we will use the show_progress + # flag to determine whether we should show the pbar. + show_progress = show_progress and flog.getEffectiveLevel() <= FancyLogger.INFO + failed_results: list[ModelOutputThunk] = [] failed_scores: list[list[tuple[Requirement, ValidationResult]]] = [] failed_instructions: list[Instruction] = []