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

Added a schema and a writer for the 2.0 Core training data #6396

Merged
merged 4 commits into from
Aug 13, 2020

Conversation

degiz
Copy link
Contributor

@degiz degiz commented Aug 12, 2020

Closes #6374

Proposed changes:

  • Added a schema and a writer for the 2.0 Core format
  • Unified the syntax for slot_was_set event
  • In this implementation we skip stories that contain forms
  • This implementation of writer is done with "old MD -> YAML" in mind, so neither forms nor rules are supported now

Status (please check what you already did):

  • 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)

@degiz degiz requested a review from federicotdn August 12, 2020 16:06
@degiz degiz force-pushed the 6374_fixed_core_schema_and_writer branch from 0f6d0de to 3bb3c9b Compare August 12, 2020 16:09
@degiz degiz marked this pull request as ready for review August 12, 2020 16:09
@degiz degiz requested a review from tmbo August 12, 2020 16:09
def process_story_step(self, story_step: StoryStep) -> Optional[OrderedDict]:

if self.story_contains_forms(story_step):
raise_warning(
Copy link
Member

Choose a reason for hiding this comment

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

can we print them somewhere or dump them to a separate file or something? anything that makes it easier to transition if the user was using forms the old way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great idea! I'll make a note to do that later. Currently look a little bit timely because we parse MD line by line, and requires me to know the code better, so not easy to implement before tomorrow.


if self.story_contains_forms(story_step):
raise_warning(
f'File "{self.target}" contains a story "{story_step.block_name}" '
Copy link
Member

Choose a reason for hiding this comment

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

what happens if a user annotates a conversation that has a form in rasa x?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This implementation of writer is done with "old MD -> YAML" in mind, so neither forms nor rules are supported now, also as a first implementation the Rasa X doesn't have an access to this writer at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should have noted that in the Issue description 😬

Copy link
Contributor

@federicotdn federicotdn 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! 👍 I have nothing important to add, only small details.

@degiz degiz force-pushed the 6374_fixed_core_schema_and_writer branch from b4d5f7f to 1c6a273 Compare August 13, 2020 10:39
@degiz degiz force-pushed the 6374_fixed_core_schema_and_writer branch from 1c6a273 to d1f1eb9 Compare August 13, 2020 11:47
@degiz degiz force-pushed the 6374_fixed_core_schema_and_writer branch from d1f1eb9 to 4326797 Compare August 13, 2020 12:49
@degiz degiz merged commit 671c6e0 into master Aug 13, 2020
@degiz degiz deleted the 6374_fixed_core_schema_and_writer branch August 13, 2020 15:37
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.

Add schema and writer for 2.0 Core data
4 participants