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

speed up is_key_in_yaml #7952

Closed
wochinge opened this issue Feb 15, 2021 · 0 comments · Fixed by #7968
Closed

speed up is_key_in_yaml #7952

wochinge opened this issue Feb 15, 2021 · 0 comments · Fixed by #7968
Assignees
Labels
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.) feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@wochinge
Copy link
Contributor

wochinge commented Feb 15, 2021

Problem
We currently use the function is_key_in_yaml to check if a file is a nlu or story file. This reads and parses the entire yaml file just to see if a key is present.

This makes the training data reading slow because:

  • we read the entire file although this information might be right in the beginning
  • we parse the entire file although we don't need to

Proposed Solution:

@wochinge wochinge added type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. 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.) labels Feb 15, 2021
@alwx alwx 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
@alwx alwx closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.) feature:ux-cli+training-data Feature: Improve user experience with Rasa CLI and training data for developers type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants