Valid callback actions. These can be passed to `seterr` or `errstate` to create callbacks when specific events occur (e.g. an operation produces `NaN`s). IGNORE: take no action. PRINT: print a warning to `stdout`. RAISE: raise an error (e.g. `InfOrNanError`). WARN: print a warning
| 32 | |
| 33 | |
| 34 | class ExecutionCallback(enum.Enum): |
| 35 | """Valid callback actions. |
| 36 | |
| 37 | These can be passed to `seterr` or `errstate` to create callbacks when |
| 38 | specific events occur (e.g. an operation produces `NaN`s). |
| 39 | |
| 40 | IGNORE: take no action. |
| 41 | PRINT: print a warning to `stdout`. |
| 42 | RAISE: raise an error (e.g. `InfOrNanError`). |
| 43 | WARN: print a warning using `tf.compat.v1.logging.warn`. |
| 44 | """ |
| 45 | |
| 46 | IGNORE = "ignore" |
| 47 | PRINT = "print" |
| 48 | RAISE = "raise" |
| 49 | WARN = "warn" |
| 50 | |
| 51 | _DEFAULT_CALLBACK_ACTION = ExecutionCallback.RAISE |
| 52 |
no outgoing calls
no test coverage detected