Skip to content

Commit

Permalink
Add nice hint to find source of UserWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Jan 23, 2021
1 parent 40c4a93 commit d075f60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pyscaffoldext/dsproject/templates/train_model_py.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import ${qual_pkg}

# fallback to debugger on error
sys.excepthook = ultratb.FormattedTB(mode="Verbose", color_scheme="Linux", call_pdb=1)
# turn UserWarning messages to errors to find the actual cause
# import warnings
# warnings.simplefilter("error")

_logger = logging.getLogger(__name__)

Expand Down

0 comments on commit d075f60

Please sign in to comment.