Skip to content

Commit

Permalink
fix: add option to disable tqdm in minuit
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Feb 24, 2021
1 parent 83fc9c1 commit 48fc799
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tensorwaves/optimizer/minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

"""Minuit2 adapter to the `iminuit.Minuit` package."""

import logging
import time
from datetime import datetime
from typing import Dict, Iterable, Optional, Union
Expand Down Expand Up @@ -84,7 +85,9 @@ def optimize( # pylint: disable=too-many-locals
parameter_handler = ParameterFlattener(initial_parameters)
flattened_parameters = parameter_handler.flatten(initial_parameters)

progress_bar = tqdm()
progress_bar = tqdm(
disable=logging.getLogger().level > logging.WARNING
)
n_function_calls = 0

def update_parameters(pars: list) -> None:
Expand Down

0 comments on commit 48fc799

Please sign in to comment.