Migration Guide
Migration Guide
This page contains information about changes between major versions and how you can migrate from one version to another.
Rasa 1.6 to Rasa 1.7
General
- By default, the
EmbeddingIntentClassifier,EmbeddingPolicy, andResponseSelectorwill now normalize the top 10 confidence results if theloss_typeis"softmax"(which has been default since 1.3, see Rasa 1.2 to Rasa 1.3). This is configurable via theranking_lengthconfiguration parameter; to turn off normalization to match the previous behavior, setranking_length: 0.
Rasa 1.2 to Rasa 1.3
Warning
This is a release breaking backwards compatibility. It is not possible to load previously trained models. Please make sure to retrain a model before trying to use it with this improved version.
General
Default parameters of
EmbeddingIntentClassifierare changed. See Components for details. Architecture implementation is changed as well, so old trained models cannot be loaded. Default parameters and architecture forEmbeddingPolicyare changed. See Policies for details. It uses transformer instead of lstm. Old trained models cannot be loaded. They useinnersimilarity andsoftmaxloss by default instead ofcosinesimilarity andmarginloss (can be set in config file). They usebalancedbatching strategy by default to counteract class imbalance problem. The meaning ofevaluate_on_num_examplesis changed. If it is non zero, random examples will be picked by stratified split and used as hold out validation set, so they will be excluded from training data. We suggest to set it to zero (default) if data set contains a lot of unique examples of dialogue turns. Removedlabel_tokenization_flagandlabel_split_symbolfrom component. Instead moved intent splitting toTokenizercomponents viaintent_tokenization_flagandintent_split_symbolflag.Default
max_historyforEmbeddingPolicyisNonewhich means it’ll use theFullDialogueTrackerFeaturizer. We recommend to setmax_historyto some finite value in order to useMaxHistoryTrackerFeaturizerfor faster training. See Featurization of Conversations for details. We recommend to increasebatch_sizeforMaxHistoryTrackerFeaturizer(e.g."batch_size": [32, 64])Compare mode of
rasa train coreallows the whole core config comparison. Therefore, we changed the naming of trained models. They are named by config file name instead of policy name. Old naming style will not be read correctly when creating compare plots (rasa test core). Please remove old trained models in comparison folder and retrain. Normal core training is unaffected.We updated the evaluation metric for our NER. We report the weighted precision and f1-score. So far we included
no-entityin this report. However, as most of the tokens actually don’t have an entity set, this will influence the weighted precision and f1-score quite a bit. From now on we excludeno-entityfrom the evaluation. The overall metrics now only include proper entities. You might see a drop in the performance scores when running the evaluation again./is reserved as a delimiter token to distinguish between retrieval intent and the corresponding response text identifier. Make sure you don’t include/symbol in the name of your intents.
Rasa NLU 0.14.x and Rasa Core 0.13.x to Rasa 1.0
Warning
This is a release breaking backwards compatibility. It is not possible to load previously trained models. Please make sure to retrain a model before trying to use it with this improved version.
General
The scripts in
rasa.coreandrasa.nlucan no longer be executed. To train, test, run, … an NLU or Core model, you should now use the command line interfacerasa. The functionality is, for the most part, the same as before. Some changes in commands reflect the combined training and running of NLU and Core models, but NLU and Core can still be trained and used individually. If you attempt to run one of the old scripts inrasa.coreorrasa.nlu, an error is thrown that points you to the command you should use instead. See all the new commands at Command Line Interface.If you have written a custom output channel, all
send_methods subclassed from theOutputChannelclass need to take an additional**kwargsargument. You can use these keyword args from your custom action code or the templates in your domain file to send any extra parameters used in your channel’s send methods.If you were previously importing the
ButtonorElementclasses fromrasa_core.dispatcher, these are now to be imported fromrasa_sdk.utils.Rasa NLU and Core previously used separate configuration files. These two files should be merged into a single file either named
config.yml, or passed via the--configparameter.
Script parameters
All script parameter names have been unified to follow the same schema. Any underscores (
_) in arguments have been replaced with dashes (-). For example:--max_historyhas been changed to--max-history. You can see all of the script parameters in the--helpoutput of the commands in the Command Line Interface.The
--num_threadsparameter was removed from theruncommand. The server will always run single-threaded, but will now run asynchronously. If you want to make use of multiple processes, feel free to check out the Sanic server documentation.To avoid conflicts in script parameter names, connectors in the
runcommand now need to be specified with--connector, as-cis no longer supported. The maximum history in therasa visualizecommand needs to be defined with--max-history. Output paths and log files cannot be specified with-oanymore;--outand--log-fileshould be used. NLU data has been standardized to be--nluand the name of any kind of data files or directory to be--data.
HTTP API
- There are numerous HTTP API endpoint changes which can be found here.
👋 I can help you get started with Rasa and answer your technical questions.