DGL warning wrapper that defaults to ``DGLWarning`` instead of ``UserWarning`` category.
(message, category=DGLWarning, stacklevel=2)
| 49 | |
| 50 | |
| 51 | def dgl_warning(message, category=DGLWarning, stacklevel=2): |
| 52 | """DGL warning wrapper that defaults to ``DGLWarning`` instead of ``UserWarning`` category.""" |
| 53 | return warnings.warn(message, category=category, stacklevel=stacklevel) |
| 54 | |
| 55 | |
| 56 | warnings.formatwarning = dgl_warning_format |
no outgoing calls
no test coverage detected