File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,8 @@ class BaseEvaluation(ABC):
7070 Cut off time for the optuna search expressed in seconds, the default value is 15 minutes.
7171 Only used with optuna equal to True.
7272 verbose: bool, str, int, default=None
73- If not None, override default verbose level (see :func:`mne.verbose`
74- and :func:`mne.set_log_level ` for more info ).
73+ If not None, override the default MOABB logging level used by this evaluation
74+ (see :func:`moabb.utils.verbose ` for more information on how this is handled ).
7575 If used, it should be passed as a keyword-argument only.
7676
7777 Notes
Original file line number Diff line number Diff line change @@ -109,8 +109,12 @@ def wrapper(*args, **kwargs):
109109 bound .apply_defaults ()
110110 if "verbose" in bound .arguments :
111111 verbose_val = bound .arguments ["verbose" ]
112- except Exception :
113- pass
112+ except TypeError as exc :
113+ log .debug (
114+ "Failed to bind 'verbose' argument for %s: %s" ,
115+ function .__name__ ,
116+ exc ,
117+ )
114118
115119 # Check self.verbose
116120 if verbose_val is None and len (args ) > 0 :
@@ -131,8 +135,8 @@ def wrapper(*args, **kwargs):
131135 if level is not None :
132136 try :
133137 logger .setLevel (level )
134- except Exception :
135- pass
138+ except ( TypeError , ValueError ) as exc :
139+ logger . warning ( "Failed to set log level %r: %s" , level , exc )
136140
137141 try :
138142 return function (* args , ** kwargs )
You can’t perform that action at this time.
0 commit comments