diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a70f942c7148..605ac9a09ec2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -56,6 +56,15 @@ Changed (default behavior) or in a temporary directory by specifying the ``save_to_default_model_directory`` field in the training request. +[1.3.4] +^^^^^^^^^^^^^^^^^^^^ + +Fixed +----- +- asyncio warnings are now only printed if the callback takes more than 100ms + (up from 1ms) +- ``agent.load_model_from_server`` no longer affects logging + [1.3.3] - 2019-09-13 ^^^^^^^^^^^^^^^^^^^^ diff --git a/rasa/core/agent.py b/rasa/core/agent.py index d7e84ca27ecb..85139d62da81 100644 --- a/rasa/core/agent.py +++ b/rasa/core/agent.py @@ -35,7 +35,7 @@ get_model, ) from rasa.nlu.utils import is_url -from rasa.utils.common import update_sanic_log_level, set_log_level +from rasa.utils.common import update_sanic_log_level from rasa.utils.endpoints import EndpointConfig logger = logging.getLogger(__name__) @@ -132,7 +132,6 @@ async def _pull_model_and_fingerprint( async with model_server.session() as session: try: - set_log_level() params = model_server.combine_parameters() async with session.request( "GET", diff --git a/rasa/utils/io.py b/rasa/utils/io.py index 990af4b17a23..f43167b42fb1 100644 --- a/rasa/utils/io.py +++ b/rasa/utils/io.py @@ -39,7 +39,9 @@ def configure_colored_logging(loglevel): ) -def enable_async_loop_debugging(event_loop: AbstractEventLoop) -> AbstractEventLoop: +def enable_async_loop_debugging( + event_loop: AbstractEventLoop, slow_callback_duration: float = 0.1 +) -> AbstractEventLoop: logging.info( "Enabling coroutine debugging. Loop id {}.".format(id(asyncio.get_event_loop())) ) @@ -49,7 +51,7 @@ def enable_async_loop_debugging(event_loop: AbstractEventLoop) -> AbstractEventL # Make the threshold for "slow" tasks very very small for # illustration. The default is 0.1 (= 100 milliseconds). - event_loop.slow_callback_duration = 0.001 + event_loop.slow_callback_duration = slow_callback_duration # Report all mistakes managing asynchronous resources. warnings.simplefilter("always", ResourceWarning)