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

Fix interactive story counter #15

Closed
wants to merge 11 commits into from
Closed

Conversation

rafaelteodosio
Copy link
Collaborator

@rafaelteodosio rafaelteodosio commented Feb 21, 2021

Proposed changes:

  • Fix bug Interactive story counter doesn't update
  • Resolve #7462

Status:

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

joaoCeilandia and others added 2 commits February 20, 2021 03:40
Co-authored-by: joao vitor silva <[email protected]>
@rafaelteodosio rafaelteodosio added the bug Something isn't working label Feb 21, 2021
@rafaelteodosio rafaelteodosio linked an issue Feb 21, 2021 that may be closed by this pull request
@@ -75,6 +75,8 @@

MAX_VISUAL_HISTORY = 3


Copy link
Collaborator

Choose a reason for hiding this comment

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

This is made according to style sheet?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't remember doing that. I"ll change it.

@@ -816,10 +818,15 @@ def _write_stories_to_file(
else:
append_write = "w" # make a new file if not

with open(
export_story_path, "r", encoding=rasa.shared.utils.io.DEFAULT_ENCODING
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why you are using "r"? Maybe do something like append_write variable in line 819 is better.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In this code we are only reading the file to find the "interactive_story" string. There's no need to use append_write.

@coveralls
Copy link

coveralls commented Mar 7, 2021

Pull Request Test Coverage Report for Build 639324339

  • 82 of 93 (88.17%) changed or added relevant lines in 15 files are covered.
  • 8 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.01%) to 87.29%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rasa/utils/train_utils.py 7 8 87.5%
rasa/core/training/interactive.py 5 7 71.43%
rasa/shared/nlu/training_data/training_data.py 14 16 87.5%
rasa/core/tracker_store.py 0 3 0.0%
rasa/utils/tensorflow/layers.py 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
rasa/core/policies/ted_policy.py 1 73.24%
rasa/core/tracker_store.py 1 87.08%
rasa/utils/tensorflow/models.py 1 93.4%
rasa/shared/nlu/training_data/loading.py 2 95.06%
rasa/utils/tensorflow/layers.py 3 91.01%
Totals Coverage Status
Change from base Build 585609801: -0.01%
Covered Lines: 22107
Relevant Lines: 25326

💛 - Coveralls

@SamuelNoB SamuelNoB closed this Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive story counter doesn't update #7462 Interactive story counter doesn't update
5 participants