(loss_threshold)
| 230 | |
| 231 | |
| 232 | def validate_loss_threshold(loss_threshold): |
| 233 | if loss_threshold is not None and ( |
| 234 | not isinstance(loss_threshold, numbers.Number) |
| 235 | or isinstance(loss_threshold, bool) |
| 236 | ): |
| 237 | raise Exception( |
| 238 | "The loss_threshold argument should be None or a numeric value. " |
| 239 | f"Given value: {loss_threshold}" |
| 240 | ) |
| 241 | |
| 242 | |
| 243 | class Trials: |