Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __init__() got an unexpected keyword argument 'nlu_threshold' #4933

Closed
svkmdl opened this issue Dec 10, 2019 · 2 comments
Closed
Labels
type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@svkmdl
Copy link

svkmdl commented Dec 10, 2019

Rasa version: 1.5.2

Rasa SDK version (if used & relevant): 0.14.0

Rasa X version (if used & relevant):

Python version: 3.6.9

Operating system (windows, osx, ...): ubuntu

Issue:
On 'rasa train', this error appears

Error (including full traceback):

Traceback (most recent call last):
  File "/home/souvik/rasa_de/rasa_de_env/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/cli/train.py", line 76, in train
    kwargs=extract_additional_arguments(args),
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/train.py", line 46, in train
    kwargs=kwargs,
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/train.py", line 97, in train_async
    kwargs,
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/train.py", line 184, in _train_async_internal
    kwargs=kwargs,
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/train.py", line 219, in _do_training
    kwargs=kwargs,
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/train.py", line 357, in _train_core_with_validated_data
    kwargs=kwargs,
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/core/train.py", line 44, in train
    policies = config.load(policy_config)
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/core/config.py", line 28, in load
    return PolicyEnsemble.from_dict(config_data)
  File "/home/souvik/rasa_de/rasa_de_env/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 319, in from_dict
    policy_object = constr_func(**policy)
TypeError: __init__() got an unexpected keyword argument 'nlu_threshold'

Command or request that led to error:

rasa train

Content of configuration file (config.yml) (if relevant):

language: de
pipeline: pretrained_embeddings_spacy
policies:
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy
- name: "FallbackPolicy"
- name: "FormPolicy"
  nlu_threshold: 0.1
  core_threshold: 0.1
  fallback_action_name: "action_default_fallback"

Content of domain file (domain.yml) (if relevant):

intents:
- greet
- goodbye
- affirm
- deny
- bot_challenge
- card_lost
- card_stolen
- kartensperre
- out_of_scope

entities:
  - cardtype
  - verfallsdatum
  - verlustart
  - ersatzkarte
  - anrufer_ist_auch_karteninhaber

slots:
   cardtype:
      type: categorical
      values:
      - bankomatkarte
      - kreditkarte
      - karte
   verlustart:
      type: categorical
      values:
      - verlust
      - diebstahl
      - sonstiges
   ersatzkarte:
      type: categorical
      values:
      - ja
      - nein
   anrufer_ist_auch_karteninhaber:
      type: categorical
      values:
      - ja
      - nein
templates:
  utter_greet:
  - text: 'Hallo! '
  - text: Servus!
  - text: Grüß Gott!
  - text: Guten Tag!
  utter_what_can_i_do:
  - text: Was kann ich für Sie tun?
  utter_goodbye:
  - text: Ciao
  - text: Tschüss
  - text: Auf Wiederhören
  - text: Schönen Tag
  utter_iamabot:
  - text: Erwischt! Ich bin ein Bot, powered by Contexity.
  utter_which_cardtype:
  - text: "Um welchen Kartentyp handelt es sich?"
  utter_which_verlustart:
  - text: "Um welchen Kartentyp handelt es sich?"
  utter_anything_else:
  - text: Kann ich sonst noch etwas für Sie tun?
  utter_case_kartensperre:
  - text: Ich habe erkannt, dass Sie Ihre {cardtype} sperren möchten wegen {verlustart}, stimmt das?
  utter_ersatzkarte_required:
  - text: "Erfordern Sie eine ersatzkarte?"
  utter_which_verfallsdatum:
  - text: "Wann war die karte verloren?"
  utter_anrufer_ist_auch_karteninhaber:
  - text: "Sind Sie der karteninhaber?"
  utter_slots_values:
  - text: "Entered slots:\n
             - cardtype: {cardtype}\n
             - verlustart: {verlustart}\n
             - ersatzkarte: {ersatzkarte}"
  utter_what_a_pity:
  - text: Schade!
  - text: So was Blödes...
  - text: Mist!
  utter_default:
  - text: Das kann ich leider nicht...

actions:
- utter_greet
- utter_what_can_i_do
- utter_case_kartensperre
- utter_which_cardtype
- utter_which_verfallsdatum
- utter_which_verlustart
- utter_ersatzkarte_required
- utter_anrufer_ist_auch_karteninhaber
- utter_anything_else
- utter_what_a_pity
- utter_goodbye
- utter_iamabot
- utter_default
- utter_slots_values
forms:
  - card_lost_form
@svkmdl svkmdl added the type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. label Dec 10, 2019
@erohmensing
Copy link
Contributor

@SouvikMondalD looks like you passed the FallbackPolicy parameters to your FormPolicy, moving them should fix this

@svkmdl
Copy link
Author

svkmdl commented Dec 10, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

2 participants