Migration issue : "rasa data convert config" ends up with an error - Rasa Open Source - Rasa Community Forum
👋 Introducing the Rasa Playground
Migration issue : “rasa data convert config” ends up with an error
post by Bhanu on Nov 26, 2020
(vlogs_v2) [root form_bot_v6]# rasa data convert config
Your model configuration contains the ‘FormPolicy’. Note that this command does not migrate the ‘FormPolicy’ and you have to migrate the ‘FormPolicy’ manually. Please see the migration guide for further details: Version Migration Guide
2020-11-26 06:54:18 INFO rasa.shared.utils.validation - The ‘version’ key is missing in the training data file /rasa/bots_v2/form_bot_v6/domain.yml. Rasa Open Source will read the file as a version ‘2.0’ file. See Training Data Format.
/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/shared/core/slots.py:262: FutureWarning: UnfeaturizedSlot is deprecated and will be removed in Rasa Open Source 3.0. Please change the type and configure the ‘influence_conversation’ flag for slot ‘requested_slot’ instead.
category=FutureWarning,
/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/shared/core/domain.py:616: FutureWarning: The forms section in the domain used the old Rasa Open Source 1 list format to define forms. Rasa Open Source will be configured to use the deprecated FormAction within the Rasa SDK. If you want to use the new Rasa Open Source 2 FormAction adapt your forms section as described in the documentation. Support for the deprecated FormAction in the Rasa SDK will be removed in Rasa Open Source 3.0.
category=FutureWarning,
Output file ‘data/rules.yml’ did not exist and will be created.
Migrating the ‘MappingPolicy’.
Migrating the ‘FallbackPolicy’.
Traceback (most recent call last):
File “/rasa/anaconda3/envs/vlogs_v2/bin/rasa”, line 8, in
sys.exit(main())
File “/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/main.py”, line 116, in main
cmdline_arguments.func(cmdline_arguments)
File “/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/cli/data.py”, line 459, in _migrate_model_config
model_configuration
File “/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/core/config.py”, line 81, in migrate_fallback_policies
_update_fallback_config(new_config, fallback_config)
File “/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/core/config.py”, line 135, in _update_fallback_config
FallbackClassifier. name, config.get(“pipeline”,
[])
File “/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/core/config.py”, line 103, in _get_config_for_name
(config for config in config_part if config.get(“name”) == component_name), {}
File “/rasa/anaconda3/envs/vlogs_v2/lib/python3.6/site-packages/rasa/core/config.py”, line 103, in
(config for config in config_part if config.get(“name”) == component_name), {}
AttributeError: ‘str’ object has no attribute ‘get’
post by kearnsw on Nov 26, 2020
Can you post your config.yml file?
post by Bhanu on Nov 26, 2020
config.yml (268 Bytes)
post by kearnsw on Nov 26, 2020
The only thing that sticks out to me is that pipeline templates, e.g. supervised_embeddings were all deprecated even before the update to 2.0. Since your config looks pretty standard, I’d suggest starting with the new default config instead of trying to convert your old one. Here is the new default config for convenience:
language: en
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
# - name: WhitespaceTokenizer
# - name: RegexFeaturizer
# - name: LexicalSyntacticFeaturizer
# - name: CountVectorsFeaturizer
# - name: CountVectorsFeaturizer
# analyzer: char_wb
# min_ngram: 1
# max_ngram: 4
# - name: DIETClassifier
# epochs: 100
# - name: EntitySynonymMapper
# - name: ResponseSelector
# epochs: 100
# - name: FallbackClassifier
# threshold: 0.3
# ambiguity_threshold: 0.1
policies:
- name: MemoizationPolicy
- name: TEDPolicy
max_history: 5
epochs: 10
post by Bhanu on Nov 27, 2020
Thanks for taking out time and trying to resolve it.
Yeah… I was also thinking of doing it manually… but I don’t think error is because of the pipeline template as the error is coming while migrating the fallback policy.
post by kearnsw on Nov 27, 2020
It looks like the Fallback Policy needs to be manually migrated to a number of different locations:
Which requires the following updates to the config (note it is added to both policies and pipeline):
policies:
# Other policies
- name: RulePolicy
core_fallback_threshold: 0.3
core_fallback_action_name: "action_default_fallback"
pipeline:
# Other components
- name: FallbackClassifier
threshold: 0.4
ambiguity_threshold: 0.1
and rules.yml:
rules:
- rule: Ask the user to rephrase whenever they send a message with low NLU confidence
steps:
- intent: nlu_fallback
- action: utter_please_rephrase
I still don’t believe you’ll be able to convert the file due to the pipeline template, so you’ll want to remove that as well.
post by BelenAleman on Feb 26, 2024
I would like to share the following Python script that facilitates the migration process from Dialogflow to Rasa Open Source.
Feel free to test it and share any comment/issue/improvement
Best,
Belén