Disable Agent debug messages for inference

Hello,

I am using a pretrained RASA model (obtained through rasa nlu train) in order to perform inference for a set of short sentences. Previously, I used RASA 3.1.0 for this, however, after updating to RASA 3.6.0 I get a debug message for each sentence in the test set, which makes inference slower. Each message looks like this:

2023-07-02 15:04:59 [debug ] processor.message.parse parse_data_entities= parse_data_intent={‘name’: ‘country_support’, ‘confidence’: 0.9956925511360168} parse_data_text=What countries do you do business in?

How can I disable these debug messages? I’ve looked in the documentation for Agent (rasa.core.agent) and parse_message (rasa.core.agent) but I did not find any flag to turn on / off the debug messages. How can I turn them off?

Thank you!

1 Like

Hi,

Have you used 3.5, does it has same error?

Hi @sonam , we are facing the same issue after updating from Rasa 3.5.11 to 3.7.0b1. The issue was not present in 3.5.11. Happy to share more details if required.

Regarding how to turn off these messages, the obvious approach is to set LOG_LEVEL environment variable, as defined in constants.py. However, even if not defined, the default log level is INFO, so debug messages shouldn’t appear, but they do.

https://rasa-open-source.atlassian.net/browse/OSS-718

Found the following solution. We now call the configure structlog function in addition to the configure logs and warnings function:

def prepare_rasa_env_inline():
    import warnings

    from rasa.utils.common import configure_logging_and_warnings
    from rasa.utils.log_utils import configure_structlog

    # for rasa logging
    os.environ["LOG_LEVEL"] = "INFO"
    os.environ["LOG_LEVEL_LIBRARIES"] = "INFO"

    configure_logging_and_warnings()
    configure_structlog()

    ...