How to show debug/verbose infos when not using run.py?

Hi,

How can you show eg the debug infos when not using the run.py with --debug instead with a custom file like:


def train_dialogue(domain_file = 'domain.yml',
                    model_path = './models/dialogue',
                    training_data_file = './data/stories.md'):
                    
    agent = Agent(domain_file, policies = [MemoizationPolicy(max_history=3),KerasPolicy()])
    
    data = agent.load_data(training_data_file)

    agent.train(data,
                epochs = 300,
                batch_size = 15,
                validation_split = 0.0,
                augmentation_factor = 0)
                
    agent.persist(model_path)
    return agent
    
def run_bot():

    interpreter = RasaNLUInterpreter('model')
    agent = Agent.load('./models/dialogue', interpreter = interpreter)
    agent.handle_channel(ConsoleInputChannel())
        
    return agent
    
if __name__ == '__main__':
    train_dialogue()
    run_bot()

use

import logging
logging.basicConfig(level="DEBUG")

in your main

thanks!