MCPcopy
hub / github.com/hyperopt/hyperopt / validate_timeout

Function validate_timeout

hyperopt/base.py:220–229  ·  view source on GitHub ↗
(timeout)

Source from the content-addressed store, hash-verified

218
219
220def validate_timeout(timeout):
221 if timeout is not None and (
222 not isinstance(timeout, numbers.Number)
223 or timeout <= 0
224 or isinstance(timeout, bool)
225 ):
226 raise Exception(
227 "The timeout argument should be None or a positive value. "
228 f"Given value: {timeout}"
229 )
230
231
232def validate_loss_threshold(loss_threshold):

Callers 3

fminFunction · 0.90
__init__Method · 0.90
fminMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected