We use python notebooks for that functionality in the early stages of script testing. Load a cell up top with the model, then do your stuff below, and once things look good convert it to a normal python script.
Are you running both DearImGui visualisation and training locally? If not, how can one use it in the client-server mode? I think this is the most common requirement for visualisation libraries in Deep Learning.