Rasa assistant veeery slow

I’m new to Rasa and have just deployed my first assistant. I’m trying to use it to apply for a job that is Rasa-based.

It works sometimes (rarely), but even when it does it’s painfully slow (up to 30 secs for a response).

It’s Rasa Pro deployed on GCP and I’m using a macbook.

Any idea why this might be and what I could do?

I’ve now removed all custom actions and run debug. This is the debug log:

/Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/rasa/core/tracker_store.py:1044: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to “sqlalchemy<2.0”. Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: Error Messages — SQLAlchemy 2.0 Documentation) Base: DeclarativeMeta = declarative_base() /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/rasa/shared/utils/validation.py:134: DeprecationWarning: pkg_resources is deprecated as an API. See Package Discovery and Resource Access using pkg_resources - setuptools 75.2.0.post20241017 documentation import pkg_resources /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/pkg_resources/init.py:3154: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace(‘mpl_toolkits’). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See Keywords - setuptools 75.2.0.post20241017 documentation declare_namespace(pkg) /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/pkg_resources/init.py:3154: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace(‘ruamel’). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See Keywords - setuptools 75.2.0.post20241017 documentation declare_namespace(pkg) 2024-10-17 18:28:56 DEBUG rasa.cli.utils - Parameter ‘credentials’ not set. Using default location ‘credentials.yml’ instead. /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/sanic_cors/extension.py:39: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SANIC_VERSION = LooseVersion(sanic_version) 2024-10-17 18:28:58 DEBUG h5py._conv - Creating converter from 7 to 5 2024-10-17 18:28:58 DEBUG h5py._conv - Creating converter from 5 to 7 2024-10-17 18:28:58 DEBUG h5py._conv - Creating converter from 7 to 5 2024-10-17 18:28:58 DEBUG h5py._conv - Creating converter from 5 to 7 2024-10-17 18:28:58 DEBUG jax._src.path - etils.epath was not found. Using pathlib for file I/O. /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/tensorflow/lite/python/util.py:52: DeprecationWarning: jax.xla_computation is deprecated. Please use the AOT APIs. from jax import xla_computation as _xla_computation 2024-10-17 18:28:59 DEBUG sanic.root - Sanic-CORS: Configuring CORS with resources: {‘/‘: {‘origins’: [’‘], ‘methods’: ‘DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT’, ‘allow_headers’: [’.’], ‘expose_headers’: ‘filename’, ‘supports_credentials’: True, ‘max_age’: None, ‘send_wildcard’: False, ‘automatic_options’: True, ‘vary_header’: True, ‘resources’: {‘/*’: {‘origins’: ‘’}}, ‘intercept_exceptions’: True, ‘always_send’: True}} 2024-10-17 18:28:59 DEBUG rasa.core.utils - Available web server routes: /webhooks/rasa GET rasa_core_no_api.custom_webhook_RasaChatInput.health /webhooks/rasa/webhook POST rasa_core_no_api.custom_webhook_RasaChatInput.receive /webhooks/rest GET rasa_core_no_api.custom_webhook_RestInput.health /webhooks/rest/webhook POST rasa_core_no_api.custom_webhook_RestInput.receive /socket.io GET rasa_core_no_api.handle_request / GET rasa_core_no_api.hello /webhooks/socketio GET rasa_core_no_api.socketio_webhook.health 2024-10-17 18:28:59 INFO root - Starting Rasa server on http://0.0.0.0:5005 2024-10-17 18:28:59 DEBUG rasa.core.utils - Using the default number of Sanic workers (1). 2024-10-17 18:28:59 DEBUG rasa.telemetry - Skipping telemetry reporting: no license hash found. 2024-10-17 18:28:59 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore. 2024-10-17 18:28:59 DEBUG rasa.core.lock_store - Connected to lock store ‘InMemoryLockStore’. 2024-10-17 18:28:59 DEBUG rasa.core.nlg.generator - Instantiated NLG to ‘TemplatedNaturalLanguageGenerator’. 2024-10-17 18:28:59 INFO rasa.core.processor - Loading model models/20241017-182848-espressivo-ladder.tar.gz… 2024-10-17 18:28:59 DEBUG rasa.engine.storage.local_model_storage - Extracted model to ‘/var/folders/gw/1k7_nn090cd_fttzv0f5lylm0000gn/T/tmp39drr5cw’. 2024-10-17 18:28:59 DEBUG rasa.engine.graph - Node ‘nlu_message_converter’ loading ‘NLUMessageConverter.load’ and kwargs: ‘{}’. 2024-10-17 18:28:59 DEBUG rasa.engine.graph - Node ‘run_WhitespaceTokenizer0’ loading ‘WhitespaceTokenizer.load’ and kwargs: ‘{}’. 2024-10-17 18:28:59 DEBUG rasa.engine.graph - Node ‘run_CountVectorsFeaturizer1’ loading ‘CountVectorsFeaturizer.load’ and kwargs: ‘{}’. 2024-10-17 18:28:59 DEBUG rasa.engine.storage.local_model_storage - Resource ‘train_CountVectorsFeaturizer1’ was requested for reading. 2024-10-17 18:28:59 DEBUG rasa.engine.graph - Node ‘run_DIETClassifier2’ loading ‘DIETClassifier.load’ and kwargs: ‘{}’. 2024-10-17 18:28:59 DEBUG rasa.engine.storage.local_model_storage - Resource ‘train_DIETClassifier2’ was requested for reading. 2024-10-17 18:28:59 DEBUG rasa.utils.tensorflow.models - Loading the model from /var/folders/gw/1k7_nn090cd_fttzv0f5lylm0000gn/T/tmp3ryhzwyd/train_DIETClassifier2/DIETClassifier.tf_model with finetune_mode=False… 2024-10-17 18:28:59 DEBUG rasa.nlu.classifiers.diet_classifier - You specified ‘DIET’ to train entities, but no entities are present in the training data. Skipping training of entities. 2024-10-17 18:28:59 DEBUG rasa.nlu.classifiers.diet_classifier - Following metrics will be logged during training: 2024-10-17 18:28:59 DEBUG rasa.nlu.classifiers.diet_classifier - t_loss (total loss) 2024-10-17 18:28:59 DEBUG rasa.nlu.classifiers.diet_classifier - i_acc (intent acc) 2024-10-17 18:28:59 DEBUG rasa.nlu.classifiers.diet_classifier - i_loss (intent loss) 2024-10-17 18:28:59 WARNING absl - At this time, the v2.11+ optimizer tf.keras.optimizers.Adam runs slowly on M1/M2 Macs, please use the legacy Keras optimizer instead, located at tf.keras.optimizers.legacy.Adam. 2024-10-17 18:28:59 WARNING absl - There is a known slowdown when using v2.11+ Keras optimizers on M1/M2 Macs. Falling back to the legacy Keras optimizer, i.e., tf.keras.optimizers.legacy.Adam. 2024-10-17 18:29:03 DEBUG rasa.utils.tensorflow.models - Finished loading the model. /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/rasa/utils/train_utils.py:530: UserWarning: constrain_similarities is set to False. It is recommended to set it to True when using cross-entropy loss. rasa.shared.utils.io.raise_warning( 2024-10-17 18:29:03 DEBUG rasa.engine.graph - Node ‘run_RegexMessageHandler’ loading ‘RegexMessageHandler.load’ and kwargs: ‘{}’. 2024-10-17 18:29:03 DEBUG rasa.engine.graph - Node ‘domain_provider’ loading ‘DomainProvider.load’ and kwargs: ‘{}’. 2024-10-17 18:29:03 DEBUG rasa.engine.storage.local_model_storage - Resource ‘domain_provider’ was requested for reading. 2024-10-17 18:29:03 DEBUG rasa.engine.graph - Node ‘run_MemoizationPolicy0’ loading ‘MemoizationPolicy.load’ and kwargs: ‘{}’. 2024-10-17 18:29:03 DEBUG rasa.engine.storage.local_model_storage - Resource ‘train_MemoizationPolicy0’ was requested for reading. 2024-10-17 18:29:03 DEBUG rasa.engine.graph - Node ‘run_RulePolicy1’ loading ‘RulePolicy.load’ and kwargs: ‘{}’. 2024-10-17 18:29:03 DEBUG rasa.engine.storage.local_model_storage - Resource ‘train_RulePolicy1’ was requested for reading. 2024-10-17 18:29:03 DEBUG rasa.engine.graph - Node ‘run_TEDPolicy2’ loading ‘TEDPolicy.load’ and kwargs: ‘{}’. 2024-10-17 18:29:03 DEBUG rasa.engine.storage.local_model_storage - Resource ‘train_TEDPolicy2’ was requested for reading. 2024-10-17 18:29:03 DEBUG rasa.utils.tensorflow.models - Loading the model from /var/folders/gw/1k7_nn090cd_fttzv0f5lylm0000gn/T/tmp3ryhzwyd/train_TEDPolicy2/ted_policy.tf_model with finetune_mode=False… 2024-10-17 18:29:03 WARNING absl - At this time, the v2.11+ optimizer tf.keras.optimizers.Adam runs slowly on M1/M2 Macs, please use the legacy Keras optimizer instead, located at tf.keras.optimizers.legacy.Adam. 2024-10-17 18:29:03 WARNING absl - There is a known slowdown when using v2.11+ Keras optimizers on M1/M2 Macs. Falling back to the legacy Keras optimizer, i.e., tf.keras.optimizers.legacy.Adam. 2024-10-17 18:29:06 DEBUG rasa.utils.tensorflow.models - Finished loading the model. /Users/gavinreid/Code/rasa_projects/cv_bot/p39/lib/python3.9/site-packages/rasa/shared/utils/io.py:99: UserWarning: ‘evaluate_every_number_of_epochs=20’ is greater than ‘epochs=1’. No evaluation will occur. 2024-10-17 18:29:06 DEBUG rasa.engine.graph - Node ‘rule_only_data_provider’ loading ‘RuleOnlyDataProvider.load’ and kwargs: ‘{}’. 2024-10-17 18:29:06 DEBUG rasa.engine.storage.local_model_storage - Resource ‘train_RulePolicy1’ was requested for reading. 2024-10-17 18:29:06 DEBUG rasa.engine.graph - Node ‘select_prediction’ loading ‘DefaultPolicyPredictionEnsemble.load’ and kwargs: ‘{}’. 2024-10-17 18:29:06 INFO root - Rasa server is up and running. 2024-10-17 18:29:06 INFO root - Enabling coroutine debugging. Loop id 6126255648.