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

Avoid training CountVectorizer if no text is provided #4433

Merged
merged 5 commits into from Sep 11, 2019

Conversation

dakshvar22
Copy link
Contributor

Proposed changes:

  • Add a check for empty text list for a particular attribute before calling the fit function on CountVectorizer object.
  • Train method will now only log a warning if some text is provided for an attribute, but still .fit() throws an exception.

Status (please check what you already did):

  • made PR ready for code review
  • updated the changelog
  • reformat files using black (please check Readme for instructions)

Copy link
Member

@tmbo tmbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍

CHANGELOG.rst Outdated
@@ -14,6 +14,7 @@ Fixed
-----
- SQL tracker events are retrieved ordered by timestamps. This fixes interactive
learning events being shown in the wrong order.
- Added a check to avoid training CountVectorizer for a particular attribute of a message if no text is provided for that attribute across the training data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please create a new section, this will be part of 1.3.3

rasa/nlu/featurizers/count_vectors_featurizer.py Outdated Show resolved Hide resolved
@dakshvar22 dakshvar22 merged commit f364060 into 1.3.x Sep 11, 2019
@dakshvar22 dakshvar22 deleted the bug-fix-count-vector-logging branch September 11, 2019 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants