From b26fa1c207fe5e2a8b6c0d818dff0ddc8b87a902 Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Mon, 23 Oct 2023 10:32:00 +0000 Subject: [PATCH] task debug_shell --- returnn/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/returnn/__main__.py b/returnn/__main__.py index ade63b2e9c..b0990977eb 100644 --- a/returnn/__main__.py +++ b/returnn/__main__.py @@ -35,7 +35,7 @@ # These imports are not directly used here, but make them available, as other code imports them from here. # noinspection PyUnresolvedReferences -from returnn.util.debug import init_ipython_kernel, init_better_exchook, init_faulthandler +from returnn.util.debug import init_ipython_kernel, init_better_exchook, init_faulthandler, debug_shell # noinspection PyUnresolvedReferences from returnn.util.basic import init_thread_join_hack, describe_returnn_version @@ -552,6 +552,8 @@ def execute_main_task(): elif task == "initialize_model": engine.init_train_from_config(config, train_data, dev_data, eval_data) engine.save_model(config.value("model", "dummy")) + elif task == "debug_shell": + debug_shell(locals(), globals()) else: raise Exception("unknown task: %r" % (task,))