1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 06:46:56 +08:00

Enhance pytorch nn (#917)

* enhance pytorch_nn

* fix dim bug

* Black format

* Fix pylint error
This commit is contained in:
you-n-g
2022-02-15 19:22:48 +08:00
committed by GitHub
parent 0e8b94a552
commit 60d45ad770
13 changed files with 281 additions and 139 deletions

View File

@@ -20,6 +20,9 @@ def experiment_exit_handler():
The `atexit` handler should be put in the last, since, as long as the program ends, it will be called.
Thus, if any exception or user interuption occurs beforehead, we should handle them first. Once `R` is
ended, another call of `R.end_exp` will not take effect.
Limitations:
- If pdb is used in the your program, excepthook will not be triggered when it ends. The status will be finished
"""
sys.excepthook = experiment_exception_hook # handle uncaught exception
atexit.register(R.end_exp, recorder_status=Recorder.STATUS_FI) # will not take effect if experiment ends