PyBNF printing functions (pybnf.printing)¶
Contains printing commands that respect the application-wide verbosity setting.
- exception pybnf.printing.DataMismatchError(log_message, user_message=None, hint=None)[source]¶
A mismatch between the experimental data and what the fit simulates or reads, found while scoring: a data column no simulated output matches, or a column, binding table or model entity that a noise model needs and the data or simulation does not have.
It is a property of the setup, not of the parameter set being scored, so every evaluation would meet it. The scoring paths therefore let it end the run with its message, where any other error from scoring one parameter set is recorded as a failed evaluation and the fit goes on (#388). Before this class existed both paths recorded it as a failed evaluation, so a fit could finish having scored only the columns that matched, or nothing at all (lanl/PyBNF#817, #1030).
- exception pybnf.printing.PybnfError(log_message, user_message=None, hint=None)[source]¶
Represents a user-generated error for which we can provide an informative message to the user about what went wrong with the input before quitting.
Two independent knobs shape what the user sees.
user_messagereplaces the log message – for a diagnosis that is too technical to show as-is, restated in user-facing terms.hintappends to it – for the remedy the user needs alongside the diagnosis, not instead of it. A refusal that carries only a generic remedy inuser_messagesilently discards its own reason (#527): the reason reaches the log and the user is told to give up without being told what to fix.