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

gracefully handle wrong pipeline component format in config #7893

Closed
sentry-io bot opened this issue Feb 5, 2021 · 1 comment · Fixed by #7965
Closed

gracefully handle wrong pipeline component format in config #7893

sentry-io bot opened this issue Feb 5, 2021 · 1 comment · Fixed by #7965
Assignees
Labels
area:rasa-oss/cli Issues focused on the rasa command-line-interface area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers tool:sentry type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@sentry-io
Copy link

sentry-io bot commented Feb 5, 2021

Sentry Issue: RASA-OPEN-SOURCE-3DY

Stack Trace

AttributeError: 'str' object has no attribute 'get'
(10 additional frame(s) were not displayed)
...
  File "rasa/train.py", line 818, in _train_nlu_with_validated_data
    **additional_arguments,
  File "rasa/nlu/train.py", line 98, in train
    nlu_config, component_builder, model_to_finetune=model_to_finetune
  File "rasa/nlu/model.py", line 158, in __init__
    components.validate_requirements(cfg.component_names)
  File "rasa/nlu/config.py", line 146, in component_names
    return [c.get("name") for c in self.pipeline]
  File "rasa/nlu/config.py", line 146, in <listcomp>
    return [c.get("name") for c in self.pipeline]

Further Information

This happens if the entry for a pipeline is not a dict as expected, e.g:

pipeline:
- "hi, I'm a string and not a dict"
- name: "WhiteSpaceTokenizer"

Potential Solutions

  • Make the schema stricter (it's a joke of a schema at the moment)
  • add a check in the code which checks it's a dict and throws a RasaException with a helpful error message
  • catch exception and wrap in RasaException
@wochinge wochinge added area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) area:rasa-oss/cli Issues focused on the rasa command-line-interface type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. tool:sentry area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Feb 5, 2021
@sentry-io
Copy link
Author

sentry-io bot commented Feb 12, 2021

Sentry issue: RASA-OPEN-SOURCE-659

@TyDunn TyDunn added the effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label Feb 15, 2021
@TyDunn TyDunn assigned wochinge and unassigned wochinge Feb 15, 2021
@wochinge wochinge mentioned this issue Feb 16, 2021
4 tasks
@TyDunn TyDunn added the feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers label Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss/cli Issues focused on the rasa command-line-interface area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers tool:sentry type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants