rasa-pro 3.10.10__py3-none-any.whl → 3.10.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rasa-pro might be problematic. Click here for more details.

Files changed (38) hide show
  1. README.md +17 -396
  2. rasa/cli/arguments/train.py +9 -3
  3. rasa/cli/train.py +40 -2
  4. rasa/cli/utils.py +7 -5
  5. rasa/constants.py +1 -1
  6. rasa/core/featurizers/single_state_featurizer.py +22 -1
  7. rasa/core/featurizers/tracker_featurizers.py +115 -18
  8. rasa/core/policies/ted_policy.py +58 -33
  9. rasa/core/policies/unexpected_intent_policy.py +15 -7
  10. rasa/dialogue_understanding/commands/change_flow_command.py +6 -0
  11. rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +20 -3
  12. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +29 -4
  13. rasa/e2e_test/e2e_test_runner.py +2 -2
  14. rasa/engine/storage/local_model_storage.py +41 -12
  15. rasa/model_training.py +10 -3
  16. rasa/nlu/classifiers/diet_classifier.py +38 -25
  17. rasa/nlu/classifiers/logistic_regression_classifier.py +22 -9
  18. rasa/nlu/classifiers/sklearn_intent_classifier.py +37 -16
  19. rasa/nlu/extractors/crf_entity_extractor.py +93 -50
  20. rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py +45 -16
  21. rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py +52 -17
  22. rasa/nlu/featurizers/sparse_featurizer/regex_featurizer.py +5 -3
  23. rasa/nlu/persistor.py +37 -15
  24. rasa/shared/constants.py +4 -1
  25. rasa/shared/importers/importer.py +7 -8
  26. rasa/shared/nlu/training_data/features.py +120 -2
  27. rasa/shared/utils/io.py +1 -0
  28. rasa/utils/io.py +0 -66
  29. rasa/utils/tensorflow/feature_array.py +366 -0
  30. rasa/utils/tensorflow/model_data.py +2 -193
  31. rasa/version.py +1 -1
  32. rasa_pro-3.10.12.dist-info/METADATA +196 -0
  33. {rasa_pro-3.10.10.dist-info → rasa_pro-3.10.12.dist-info}/RECORD +36 -36
  34. rasa/shared/importers/remote_importer.py +0 -196
  35. rasa_pro-3.10.10.dist-info/METADATA +0 -575
  36. {rasa_pro-3.10.10.dist-info → rasa_pro-3.10.12.dist-info}/NOTICE +0 -0
  37. {rasa_pro-3.10.10.dist-info → rasa_pro-3.10.12.dist-info}/WHEEL +0 -0
  38. {rasa_pro-3.10.10.dist-info → rasa_pro-3.10.12.dist-info}/entry_points.txt +0 -0
@@ -1,575 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: rasa-pro
3
- Version: 3.10.10
4
- Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
5
- Home-page: https://rasa.com
6
- Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
7
- Author: Rasa Technologies GmbH
8
- Author-email: hi@rasa.com
9
- Maintainer: Tom Bocklisch
10
- Maintainer-email: tom@rasa.com
11
- Requires-Python: >=3.9,<3.11
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Topic :: Software Development :: Libraries
18
- Provides-Extra: full
19
- Provides-Extra: gh-release-notes
20
- Provides-Extra: jieba
21
- Provides-Extra: metal
22
- Provides-Extra: mlflow
23
- Provides-Extra: spacy
24
- Provides-Extra: transformers
25
- Requires-Dist: CacheControl (>=0.12.14,<0.13.0)
26
- Requires-Dist: PyJWT[crypto] (>=2.8.0,<3.0.0)
27
- Requires-Dist: SQLAlchemy (>=2.0.22,<2.1.0)
28
- Requires-Dist: absl-py (>=2.0,<2.1)
29
- Requires-Dist: aio-pika (>=8.2.3,<8.2.4)
30
- Requires-Dist: aiogram (>=2.15,<2.26)
31
- Requires-Dist: aiohttp (>=3.9.4,<3.10)
32
- Requires-Dist: apscheduler (>=3.10,<3.11)
33
- Requires-Dist: attrs (>=23.1,<23.2)
34
- Requires-Dist: azure-storage-blob (>=12.16.0,<12.17.0)
35
- Requires-Dist: boto3 (>=1.35.5,<1.36.0)
36
- Requires-Dist: certifi (>=2024.07.04)
37
- Requires-Dist: cloudpickle (>=2.2.1,<3.1)
38
- Requires-Dist: colorama (>=0.4.6,<0.5.0) ; sys_platform == "win32"
39
- Requires-Dist: colorclass (>=2.2,<2.3)
40
- Requires-Dist: coloredlogs (>=15,<16)
41
- Requires-Dist: colorhash (>=2.0,<2.1.0)
42
- Requires-Dist: confluent-kafka (>=2.3.0,<3.0.0)
43
- Requires-Dist: cryptography (>=42.0.5)
44
- Requires-Dist: cvg-python-sdk (>=0.5.1,<0.6.0)
45
- Requires-Dist: dask (==2022.10.2) ; python_version >= "3.9" and python_version < "3.11"
46
- Requires-Dist: diskcache (>=5.6.3,<5.7.0)
47
- Requires-Dist: dnspython (==2.6.1)
48
- Requires-Dist: faiss-cpu (>=1.7.4,<2.0.0)
49
- Requires-Dist: faker (>=26.0.0,<27.0.0)
50
- Requires-Dist: fbmessenger (>=6.0.0,<6.1.0)
51
- Requires-Dist: github3.py (>=3.2.0,<3.3.0) ; extra == "gh-release-notes"
52
- Requires-Dist: gitpython (>=3.1.41,<3.2.0) ; extra == "full"
53
- Requires-Dist: google-auth (>=2.23.4,<3)
54
- Requires-Dist: google-cloud-storage (>=2.14.0,<3.0.0)
55
- Requires-Dist: hvac (>=1.2.1,<2.0.0)
56
- Requires-Dist: importlib-metadata (>=8.5.0,<8.6.0)
57
- Requires-Dist: importlib-resources (==6.1.3)
58
- Requires-Dist: jieba (>=0.42.1,<0.43) ; extra == "jieba" or extra == "full"
59
- Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
60
- Requires-Dist: joblib (>=1.2.0,<1.3.0)
61
- Requires-Dist: jsonpatch (>=1.33,<2.0)
62
- Requires-Dist: jsonpickle (>=3.0,<3.1)
63
- Requires-Dist: jsonschema (>=4.22)
64
- Requires-Dist: keras (==2.14.0)
65
- Requires-Dist: langchain (>=0.2.0,<0.3.0)
66
- Requires-Dist: langchain-community (>=0.2.0,<0.3.0)
67
- Requires-Dist: litellm (>=1.52.6,<1.53.0)
68
- Requires-Dist: matplotlib (>=3.7,<3.8)
69
- Requires-Dist: mattermostwrapper (>=2.2,<2.3)
70
- Requires-Dist: mlflow (>=2.15.1,<3.0.0) ; extra == "mlflow"
71
- Requires-Dist: networkx (>=3.1,<3.2)
72
- Requires-Dist: numpy (>=1.23.5,<1.25.0) ; python_version >= "3.9" and python_version < "3.11"
73
- Requires-Dist: openai (>=1.54.0,<1.55.0)
74
- Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
75
- Requires-Dist: opentelemetry-api (>=1.16.0,<1.17.0)
76
- Requires-Dist: opentelemetry-exporter-jaeger (>=1.16.0,<1.17.0)
77
- Requires-Dist: opentelemetry-exporter-otlp (>=1.16.0,<1.17.0)
78
- Requires-Dist: opentelemetry-sdk (>=1.16.0,<1.17.0)
79
- Requires-Dist: packaging (>=23.2,<23.3)
80
- Requires-Dist: pep440-version-utils (>=1.1.0,<1.2.0)
81
- Requires-Dist: pluggy (>=1.2.0,<2.0.0)
82
- Requires-Dist: portalocker (>=2.7.0,<3.0.0)
83
- Requires-Dist: presidio-analyzer (>=2.2.33,<2.2.34)
84
- Requires-Dist: presidio-anonymizer (>=2.2.354,<3.0.0)
85
- Requires-Dist: prompt-toolkit (>=3.0.28,<3.0.29)
86
- Requires-Dist: protobuf (>=4.23.3,<4.25.4)
87
- Requires-Dist: psutil (>=5.9.5,<6.0.0)
88
- Requires-Dist: psycopg2-binary (>=2.9.9,<2.10.0)
89
- Requires-Dist: pycountry (>=22.3.5,<23.0.0)
90
- Requires-Dist: pydantic (>=2.0,<3.0)
91
- Requires-Dist: pydot (>=1.4,<1.5)
92
- Requires-Dist: pykwalify (>=1.8,<1.9)
93
- Requires-Dist: pymilvus (<2.4.2)
94
- Requires-Dist: pymongo[srv,tls] (>=4.6.3,<4.7)
95
- Requires-Dist: pypred (>=0.4.0,<0.5.0)
96
- Requires-Dist: python-dateutil (>=2.8.2,<2.9.0)
97
- Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
98
- Requires-Dist: python-engineio (>=4.5.1,<6,!=5.0.0)
99
- Requires-Dist: python-keycloak (>=3.12.0,<4.0.0)
100
- Requires-Dist: python-socketio (>=5.8,<6)
101
- Requires-Dist: pytz (>=2022.7.1,<2023.0)
102
- Requires-Dist: pyyaml (>=6.0)
103
- Requires-Dist: qdrant-client (>=1.9.0,<2.0.0)
104
- Requires-Dist: questionary (>=1.10.0,<2.1.0)
105
- Requires-Dist: randomname (>=0.2.1,<0.3.0)
106
- Requires-Dist: rasa-sdk (==3.10.0)
107
- Requires-Dist: redis (>=4.6.0,<6.0)
108
- Requires-Dist: regex (>=2022.10.31,<2022.11)
109
- Requires-Dist: requests (>=2.31.0,<2.32.0)
110
- Requires-Dist: rich (>=13.4.2,<14.0.0)
111
- Requires-Dist: rocketchat_API (>=1.30.0,<1.31.0)
112
- Requires-Dist: ruamel.yaml (>=0.17.21,<0.17.22)
113
- Requires-Dist: sanic (>=22.12,<22.13)
114
- Requires-Dist: sanic-cors (>=2.2.0,<2.3.0)
115
- Requires-Dist: sanic-jwt (>=1.8.0,<2.0.0)
116
- Requires-Dist: sanic-routing (>=22.8.0,<23.0.0)
117
- Requires-Dist: scikit-learn (>=1.1.3,<1.2) ; python_version >= "3.9" and python_version < "3.11"
118
- Requires-Dist: scipy (>=1.10.1,<1.11.0) ; python_version >= "3.9" and python_version < "3.11"
119
- Requires-Dist: sentencepiece[sentencepiece] (>=0.1.99,<0.2.0) ; extra == "transformers" or extra == "full"
120
- Requires-Dist: sentry-sdk (>=1.14.0,<1.15.0)
121
- Requires-Dist: setuptools (>=70.0.0,<70.1.0)
122
- Requires-Dist: sklearn-crfsuite (>=0.3.6,<0.4.0)
123
- Requires-Dist: slack-sdk (>=3.27.1,<4.0.0)
124
- Requires-Dist: spacy (>=3.5.4,<4.0.0) ; extra == "spacy" or extra == "full"
125
- Requires-Dist: structlog (>=23.1.0,<23.2.0)
126
- Requires-Dist: structlog-sentry (>=2.0.3,<3.0.0)
127
- Requires-Dist: tarsafe (>=0.0.5,<0.0.6)
128
- Requires-Dist: tenacity (>=8.4.1,<8.5.0)
129
- Requires-Dist: tensorflow (==2.14.1) ; sys_platform != "darwin" or platform_machine != "arm64"
130
- Requires-Dist: tensorflow-cpu-aws (==2.14.1) ; sys_platform == "linux" and (platform_machine == "arm64" or platform_machine == "aarch64")
131
- Requires-Dist: tensorflow-intel (==2.14.1) ; sys_platform == "win32"
132
- Requires-Dist: tensorflow-io-gcs-filesystem (==0.31) ; sys_platform == "win32"
133
- Requires-Dist: tensorflow-io-gcs-filesystem (==0.34) ; sys_platform == "darwin" and platform_machine != "arm64"
134
- Requires-Dist: tensorflow-io-gcs-filesystem (==0.34) ; sys_platform == "linux"
135
- Requires-Dist: tensorflow-macos (==2.14.1) ; sys_platform == "darwin" and platform_machine == "arm64"
136
- Requires-Dist: tensorflow-metal (==1.1.0) ; (sys_platform == "darwin" and platform_machine == "arm64") and (extra == "metal")
137
- Requires-Dist: tensorflow-text (==2.14.0) ; sys_platform != "win32" and (platform_machine != "arm64" and platform_machine != "aarch64")
138
- Requires-Dist: tensorflow_hub (>=0.13.0,<0.14.0)
139
- Requires-Dist: terminaltables (>=3.1.10,<3.2.0)
140
- Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
141
- Requires-Dist: tqdm (>=4.66.2,<5.0.0)
142
- Requires-Dist: transformers (>=4.36.2,<4.37.0) ; extra == "transformers" or extra == "full"
143
- Requires-Dist: twilio (>=8.4,<8.5)
144
- Requires-Dist: types-protobuf (==4.25.0.20240417)
145
- Requires-Dist: typing-extensions (>=4.7.1,<5.0.0)
146
- Requires-Dist: typing-utils (>=0.1.0,<0.2.0)
147
- Requires-Dist: ujson (>=5.8,<6.0)
148
- Requires-Dist: webexteamssdk (>=1.6.1,<1.7.0)
149
- Requires-Dist: websockets (>=10.4,<11.0)
150
- Requires-Dist: wheel (>=0.40.0)
151
- Project-URL: Documentation, https://rasa.com/docs
152
- Project-URL: Repository, https://github.com/rasahq/rasa
153
- Description-Content-Type: text/markdown
154
-
155
- <h1 align="center">Rasa Pro</h1>
156
-
157
- <div align="center">
158
-
159
- [![Build Status](https://github.com/RasaHQ/rasa-private/workflows/Continuous%20Integration/badge.svg)](https://github.com/RasaHQ/rasa-private/actions)
160
- [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RasaHQ_rasa&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=RasaHQ_rasa)
161
- [![Documentation Status](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://rasa.com/docs/rasa-pro/)
162
-
163
- </div>
164
-
165
- <hr />
166
-
167
- <img align="right" height="255" src="https://www.rasa.com/assets/img/sara/sara-open-source-2.0.png" alt="An image of Sara, the Rasa mascot bird, holding a flag that reads Open Source with one wing, and a wrench in the other" title="Rasa Pro">
168
-
169
- Rasa Pro is an open core product that extends Rasa Open Source. With over 50 million downloads, Rasa Open Source is the most popular open source framework for building chat and voice-based AI assistants.
170
-
171
- Rasa Pro introduces CALM, a generative AI-native approach to developing assistants, combined with enterprise-ready analytics, security, and observability capabilities. A paid license is required to run Rasa Pro, but all Rasa Pro code is visible to end users and can be customized as needed.
172
-
173
- Rasa Pro is the pro-code component of our enterprise solution, Rasa Platform, for implementing resilient and trustworthy AI assistants at scale. Rasa Studio complements Rasa Pro with a low-code user interface, enabling anyone on your team to create and improve your assistant.
174
-
175
- ---
176
- - 🤓 [Read The Docs](https://rasa.com/docs/rasa-pro/)
177
-
178
- - 😁 [Install Rasa Pro](https://rasa.com/docs/rasa-pro/installation/python/installation)
179
-
180
- ---
181
-
182
- ## README Contents:
183
- - [Development Internals](#development-internals)
184
- - [Releases](#releases)
185
- - [Troubleshooting](#troubleshooting)
186
-
187
- ## Development Internals
188
-
189
- ### Installing Poetry
190
-
191
- Rasa uses Poetry for packaging and dependency management. If you want to build it from source,
192
- you have to install Poetry first. Please follow
193
- [the official guide](https://python-poetry.org/docs/#installation) to see all possible options.
194
-
195
- To update an existing poetry version to the [version](.github/poetry_version.txt), currently used in rasa, run:
196
- ```shell
197
- poetry self update <version>
198
- ```
199
-
200
- ### Managing environments
201
-
202
- The official [Poetry guide](https://python-poetry.org/docs/managing-environments/) suggests to use
203
- [pyenv](https://github.com/pyenv/pyenv) or any other similar tool to easily switch between Python versions.
204
- This is how it can be done:
205
-
206
- ```bash
207
- pyenv install 3.10.10
208
- pyenv local 3.10.10 # Activate Python 3.10.10 for the current project
209
- ```
210
- *Note*: If you have trouble installing a specific version of python on your system
211
- it might be worth trying other supported versions.
212
-
213
- By default, Poetry will try to use the currently activated Python version to create the virtual environment
214
- for the current project automatically. You can also create and activate a virtual environment manually — in this
215
- case, Poetry should pick it up and use it to install the dependencies. For example:
216
-
217
- ```bash
218
- python -m venv .venv
219
- source .venv/bin/activate
220
- ```
221
-
222
- You can make sure that the environment is picked up by executing
223
-
224
- ```bash
225
- poetry env info
226
- ```
227
-
228
- ### Building from source
229
-
230
- To install dependencies and `rasa` itself in editable mode execute
231
-
232
- ```bash
233
- make install
234
- ```
235
-
236
- *Note for macOS users*: under macOS Big Sur we've seen some compiler issues for
237
- dependencies. Using `export SYSTEM_VERSION_COMPAT=1` before the installation helped.
238
-
239
-
240
- #### Installing optional dependencies
241
-
242
- In order to install rasa's optional dependencies, you need to run:
243
-
244
- ```bash
245
- make install-full
246
- ```
247
-
248
- *Note for macOS users*: The command `make install-full` could result in a failure while installing `tokenizers`
249
- (issue described in depth [here](https://github.com/huggingface/tokenizers/issues/1050)).
250
-
251
- In order to resolve it, you must follow these steps to install a Rust compiler:
252
- ```bash
253
- brew install rustup
254
- rustup-init
255
- ```
256
-
257
- After initialising the Rust compiler, you should restart the console and check its installation:
258
- ```bash
259
- rustc --version
260
- ```
261
-
262
- In case the PATH variable had not been automatically setup, run:
263
- ```bash
264
- export PATH="$HOME/.cargo/bin:$PATH"
265
- ```
266
-
267
- #### Installing from published Python package
268
-
269
- We have a private package registry running at **europe-west3-docker.pkg.dev/rasa-releases/** which hosts python packages as well
270
- as docker containers. To use it, you need to be authenticated.
271
- Follow the steps in the [google documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring)
272
- to make sure `pip` has the necessary credentials to authenticate with the registry.
273
- Afterwards, you should be able to run `pip install rasa`.
274
-
275
- To be able to pull the docker image via `docker pull europe-west3-docker.pkg.dev/rasa-releases/rasa/rasa`,
276
- you’ll need to authenticate using the `gcloud auth` command: `gcloud auth configure-docker europe-west3-docker.pkg.dev`.
277
-
278
- More information is available in our [public documentation](https://rasa.com/docs/rasa-pro/installation/python/installation).
279
-
280
- ### Running the Tests
281
-
282
- In order to run the tests, make sure that you have set locally the environment variable `RASA_PRO_LICENSE` to a valid license available in 1Password.
283
- You should ensure to install the development requirements:
284
-
285
- ```bash
286
- make prepare-tests-ubuntu # Only on Ubuntu and Debian based systems
287
- make prepare-tests-macos # Only on macOS
288
- ```
289
-
290
- Then, run the tests:
291
-
292
- ```bash
293
- make test
294
- ```
295
-
296
- They can also be run at multiple jobs to save some time:
297
-
298
- ```bash
299
- JOBS=[n] make test
300
- ```
301
-
302
- Where `[n]` is the number of jobs desired. If omitted, `[n]` will be automatically chosen by pytest.
303
-
304
-
305
- ### Running the Integration Tests
306
-
307
- In order to run the integration tests, make sure that you have the development requirements installed:
308
-
309
- ```bash
310
- make prepare-tests-ubuntu # Only on Ubuntu and Debian based systems
311
- make prepare-tests-macos # Only on macOS
312
- ```
313
-
314
- Then, you'll need to start services with the following command which uses
315
- [Docker Compose](https://docs.docker.com/compose/install/):
316
-
317
- ```bash
318
- make run-integration-containers
319
- ```
320
-
321
- Finally, you can run the integration tests like this:
322
-
323
- ```bash
324
- make test-integration
325
- ```
326
-
327
- In order to run locally the integration tests for the tracing capability, you must first build the rasa image locally.
328
- You can do so using the `docker buildx bake` command.
329
- Note that the rasa image build requires a few base images, which must be built prior to building the rasa image.
330
- The Dockerfiles for these base images are located in the `docker` subdirectory.
331
-
332
- You must also set the following environment variables to build the rasa image locally:
333
- - `TARGET_IMAGE_REGISTRY`, e.g. you can either use `rasa` or the private registry `europe-west3-docker.pkg.dev/rasa-releases/rasa-docker`.
334
- - `IMAGE_TAG`, e.g. `localdev`, `latest` or PR ID.
335
- - `BASE_IMAGE_HASH`, e.g. `localdev`
336
- - `BASE_MITIE_IMAGE_HASH`, e.g. `localdev`
337
- - `BASE_BUILDER_IMAGE_HASH`, e.g. `localdev`
338
-
339
-
340
- ### Resolving merge conflicts
341
-
342
- Poetry doesn't include any solution that can help to resolve merge conflicts in
343
- the lock file `poetry.lock` by default.
344
- However, there is a great tool called [poetry-merge-lock](https://poetry-merge-lock.readthedocs.io/en/latest/).
345
- Here is how you can install it:
346
-
347
- ```bash
348
- pip install poetry-merge-lock
349
- ```
350
-
351
- Just execute this command to resolve merge conflicts in `poetry.lock` automatically:
352
-
353
- ```bash
354
- poetry-merge-lock
355
- ```
356
-
357
- ### Build a Docker image locally
358
-
359
- In order to build a Docker image on your local machine execute the following command:
360
-
361
- ```bash
362
- make build-docker
363
- ```
364
-
365
- The Docker image is available on your local machine as `rasa-private-dev`.
366
-
367
- ### Code Style
368
-
369
- To ensure a standardized code style we use the [ruff](https://docs.astral.sh/ruff/formatter/) formatter.
370
- To ensure our type annotations are correct we use the type checker [mypy](https://mypy.readthedocs.io/en/stable/).
371
- If your code is not formatted properly or doesn't type check, GitHub will fail to build.
372
-
373
- #### Formatting
374
-
375
- If you want to automatically format your code on every commit, you can use [pre-commit](https://pre-commit.com/).
376
- Just install it via `pip install pre-commit` and execute `pre-commit install` in the root folder.
377
- This will add a hook to the repository, which reformats files on every commit.
378
-
379
- If you want to set it up manually, install `ruff` via `poetry install`.
380
- To reformat files execute
381
- ```
382
- make formatter
383
- ```
384
-
385
- #### Type Checking
386
-
387
- If you want to check types on the codebase, install `mypy` using `poetry install`.
388
- To check the types execute
389
- ```
390
- make types
391
- ```
392
-
393
- ### Backporting
394
-
395
- In order to port changes to `main` and across release branches, we use the `backport` workflow located at
396
- the `.github/workflows/backport.yml` path.
397
- This workflow is triggered by the `backport-to-<release-branch>` label applied to a PR, for example `backport-to-3.8.x`.
398
- Current available target branches are `main` and maintained release branches.
399
-
400
- When a PR gets labelled `backport-to-<release-branch>`, a PR is opened by the `backport-github-action` as soon as the
401
- source PR gets closed (by merging). If you want to close the PR without merging changes, make sure to remove the `backport-to-<release-branch>` label.
402
-
403
- The PR author which the action assigns to the backporting PR has to resolve any conflicts before approving and merging.
404
- Release PRs should also be labelled with `backport-to-main` to backport the `CHANGELOG.md` updates to `main`.
405
- Backporting version updates should be accepted to the `main` branch from the latest release branch only.
406
-
407
- Here are some guidelines to follow when backporting changes and resolving conflicts:
408
-
409
- a) for conflicts in `version.py`: accept only the version from the latest release branch. Do not merge version changes
410
- from earlier release branches into `main` because this could cause issues when trying to make the next minor release.
411
-
412
- b) for conflicts in `pyproject.toml`: if related to the `rasa-pro` version, accept only the latest release branch;
413
- if related to other dependencies, accept `main` or whichever is the higher upgrade (main usually has the updated
414
- dependencies because we only do housekeeping on `main`, apart from vulnerability updates). Be mindful of dependencies that
415
- are removed from `main` but still exist in former release branches (for example `langchain`).
416
-
417
- c) for conflicts in `poetry.lock`: accept changes which were already present on the target branch, then run
418
- `poetry lock --no-update` so that the lock file contains your changes from `pyproject.toml` too.
419
-
420
- d) for conflicts in `CHANGELOG.md`: Manually place the changelog in their allocated section (e.g. 3.8.10 will go under the
421
- 3.8 section with the other releases, rather than go at the top of the file)
422
-
423
- If the backporting workflow fails, you are encouraged to cherry-pick the commits manually and create a PR to
424
- the target branch. Alternatively, you can install the backporting CLI tool as described [here](https://github.com/sorenlouv/backport?tab=readme-ov-file#install).
425
-
426
- ## Releases
427
- Rasa has implemented robust policies governing version naming, as well as release pace for major, minor, and patch releases.
428
-
429
- The values for a given version number (MAJOR.MINOR.PATCH) are incremented as follows:
430
- - MAJOR version for incompatible API changes or other breaking changes.
431
- - MINOR version for functionality added in a backward compatible manner.
432
- - PATCH version for backward compatible bug fixes.
433
-
434
- The following table describes the version types and their expected *release cadence*:
435
-
436
- | Version Type | Description | Target Cadence |
437
- |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
438
- | Major | For significant changes, or when any backward-incompatible changes are introduced to the API or data model. | Every 1 - 2 yrs |
439
- | Minor | For when new backward-compatible functionality is introduced, a minor feature is introduced, or when a set of smaller features is rolled out. | +/- Quarterly |
440
- | Patch | For backward-compatible bug fixes that fix incorrect behavior. | As needed |
441
-
442
- While this table represents our target release frequency, we reserve the right to modify it based on changing market conditions and technical requirements.
443
-
444
- ### Maintenance Policy
445
- Our End of Life policy defines how long a given release is considered supported, as well as how long a release is
446
- considered to be still in active development or maintenance.
447
-
448
- The maintenance duration and end of life for every release are shown on our website as part of the [Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/).
449
-
450
- ### Cutting a Major / Minor release
451
- #### A week before release day
452
-
453
- **Post a message on the engineering Slack channel**, letting the team know you'll be the one cutting the upcoming
454
- release, as well as:
455
- 1. Reminding everyone to go over their issues and PRs and prioritise reviews and merges
456
- 2. Reminding everyone of the scheduled date for the release
457
-
458
- #### A day before release day
459
-
460
- 1. **Evaluate the status of any PR merging that's happening. Follow up with people on their
461
- bugs and fixes.** If the release introduces new bugs or regressions that can't be fixed in time, we should discuss on
462
- Slack about this and take a decision on how to move forward. If the issue is not ready to be merged in time, we remove the issue / PR from the release and notify the PR owner and the product manager on Slack about it. The PR / issue owners are responsible for
463
- communicating any issues which might be release relevant. Postponing the release should be considered as an edge case scenario.
464
-
465
- #### Release day! 🚀
466
-
467
- 1. **At the start of the day, post a small message on slack announcing release day!** Communicate you'll be handling
468
- the release, and the time you're aiming to start releasing (again, no later than 4pm, as issues may arise and
469
- cause delays). This message should be posted early in the morning and before moving forward with any of the steps of the release,
470
- in order to give enough time to people to check their PRs and issues. That way they can plan any remaining work. A template of the slack message can be found [here](https://rasa-hq.slack.com/archives/C36SS4N8M/p1613032208137500?thread_ts=1612876410.068400&cid=C36SS4N8M).
471
- The release time should be communicated transparently so that others can plan potentially necessary steps accordingly. If there are bigger changes this should be communicated.
472
- 2. Once everything in the release is taken care of, post a small message on Slack communicating you are about to
473
- start the release process (in case anything is missing).
474
- 3. **You may now do the release by following the instructions outlined in the
475
- [Rasa Pro README](#steps-to-release-a-new-version) !**
476
-
477
- ### Steps to release a new version
478
- Releasing a new version is quite simple, as the packages are build and distributed by GitHub Actions.
479
-
480
- *Release steps*:
481
- 1. Make sure all dependencies are up to date (**especially Rasa SDK**)
482
- - For Rasa SDK, except in the case of a patch release, that means first creating a [new Rasa SDK release](https://github.com/RasaHQ/rasa-sdk#steps-to-release-a-new-version) (make sure the version numbers between the new Rasa and Rasa SDK releases match)
483
- - Once the tag with the new Rasa SDK release is pushed and the package appears on [pypi](https://pypi.org/project/rasa-sdk/), the dependency in the rasa repository can be resolved (see below).
484
- 2. If this is a minor / major release: Make sure all fixes from currently supported minor versions have been merged from their respective release branches (e.g. 3.8.x) back into main.
485
- 3. In case of a minor release, create a new branch that corresponds to the new release, e.g.
486
- ```bash
487
- git checkout -b 3.8.x
488
- git push origin 3.8.x
489
- ```
490
- 4. Switch to the branch you want to cut the release from (`main` in case of a major, the `<major>.<minor>.x` branch for minors and patches)
491
- - Update the `rasa-sdk` entry in `pyproject.toml` with the new release version and run `poetry update`. This creates a new `poetry.lock` file with all dependencies resolved.
492
- - Commit the changes with `git commit -am "bump rasa-sdk dependency"` but do not push them. They will be automatically picked up by the following step.
493
- 5. Run `make release`
494
- 6. Create a PR against the release branch (e.g. `3.8.x`)
495
- 7. Once your PR is merged, [this](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) workflow runs and an automatic tag is created and pushed to remote.
496
- (If this fails for some reason, then run the following manually on the release branch) :
497
- ```bash
498
- git checkout 3.8.x
499
- git pull origin 3.8.x
500
- git tag 3.8.0 -m "next release"
501
- git push origin 3.8.0 --tags
502
- ```
503
- GitHub will build this tag and publish the build artifacts.
504
- 8. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
505
- 9. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
506
- (In this case do the following checks):
507
- - Check the workflows in [Github Actions](https://github.com/RasaHQ/rasa-private/actions) and make sure that the merged PR of the current release is completed successfully. To easily find your PR you can use the filters `event: push` and `branch: <version number>` (example on release 2.4 you can see [here](https://github.com/RasaHQ/rasa/actions/runs/643344876))
508
- - If the workflow is not completed, then try to re-run the workflow in case that solves the problem
509
- - If the problem persists, check also the log files and try to find the root cause of the issue
510
- - If you still cannot resolve the error, contact the infrastructure team by providing any helpful information from your investigation
511
- 10. If the release is successful, add the newly created release branch to the backporting configuration in the `.backportrc.json` file to
512
- the `targetBranchesChoices` list. This is necessary for the backporting workflow to work correctly with new release branches.
513
-
514
-
515
- ### Cutting a Patch release
516
-
517
- Patch releases are simpler to cut, since they are meant to contain only bugfixes.
518
-
519
- **The only things you need to do to cut a patch release are:**
520
-
521
- 1. Notify the engineering team on Slack that you are planning to cut a patch, in case someone has an important fix
522
- to add.
523
- 2. Make sure the bugfix(es) are in the release branch you will use (p.e if you are cutting a `3.8.2` patch, you will
524
- need your fixes to be on the `3.8.x` release branch). All patch releases must come from a `.x` branch!
525
- 3. Once you're ready to release the Rasa Pro patch, checkout the branch, run `make release` and follow the
526
- steps + get the PR merged.
527
- 4. Once the PR is in, wait for the [tag release workflow](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) to create the tag.
528
- (If this fails for some reason, then run the following manually on the release branch) :
529
- ```bash
530
- git checkout 3.8.x
531
- git pull origin 3.8.x
532
- git tag 3.8.0 -m "next release"
533
- git push origin 3.8.0 --tags
534
- ```
535
- 5. After this you should see the CI workflow "Continuous Integration" in the Actions tab with the relevant tag name. Keep an eye on it to make sure it is successful as sometimes retries might be required.
536
- 6. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
537
- 7. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
538
-
539
- Make sure to merge the branch `3.7.x` after your PR with `main`. This needs to be done manually until Roberto is added (see [ATO-2091](https://rasahq.atlassian.net/browse/ATO-2091))
540
-
541
- ### Cutting a Pre release version
542
-
543
- A Pre release version is an alpha, beta, dev or rc version. For more details on which version you require refer to the [Rasa Software Release Lifecycle](https://www.notion.so/rasa/Rasa-Software-Release-Lifecycle-eb704d75f87646a9a9aca1f3fbe71fb3#6e26ac9a15b64f91bb94d6bfea9306a0)
544
-
545
- 1. Make sure you are using the right branch for the release, for instance pre releases are always made from either the main or a feature branch (especially for a dev release)
546
- 2. Once you're ready to release, checkout the branch, run `make release` and follow the
547
- steps.
548
- 3. Only in case of a pre release, the release branch created will be prefixed with 'prepare-release-pre-'
549
- 4. Note that when releasing from a feature branch the 'prepare-release-pre' branch will not be created automatically and has to be done manually. This is done to ensure all major/minor/patch releases only happens from the correct branches.
550
- (In this case the version updates will be added to the same branch as a commit, and you will have to manually create a `prepare-release-pre-' branch and push to remote)
551
- 5. Only in case of a pre release, we currently skip all test runs and docker image builds on a 'prepare-release-pre-' PR. This was done to speed up the pre release process.
552
- 6. Once your PR gets merged, the [tag release workflow](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) will create the tag.
553
- 7. After this you should see the CI workflow "Continuous Integration" in the Actions tab with the relevant tag name. Keep an eye on it to make sure it is successful as sometimes retries might be required.
554
- 8. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
555
- 9. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
556
-
557
-
558
- ### Actively maintained versions
559
-
560
- Please refer to the [Rasa Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/) page.
561
-
562
- ### Active workflows on the CI
563
-
564
- Please refer to the [WORKFLOW_README FILE](https://github.com/RasaHQ/rasa-private/blob/main/WORKFLOW_README.md)
565
-
566
- ## Troubleshooting
567
-
568
- - When running docker commands, if you encounter this error: `OSError No space left on device`, consider running:
569
-
570
- ```shell
571
- docker system prune --all
572
- ```
573
-
574
- For more information on this command, please see the [Official Docker Documentation](https://docs.docker.com/engine/reference/commandline/system_prune/).
575
-