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

Adapt the training data reader and emulator for wit.ai to their latest format #7123

Merged
merged 17 commits into from
Oct 30, 2020

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Oct 28, 2020

Proposed changes:

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)

@wochinge wochinge marked this pull request as ready for review October 28, 2020 11:05
@wochinge wochinge requested a review from ricwo October 28, 2020 11:05
@alwx alwx changed the title Update how we load training data stored in the WIT.at data format Adapt the training data reader and emulator for wit.ai to their latest format. Oct 28, 2020
@alwx alwx changed the title Adapt the training data reader and emulator for wit.ai to their latest format. Adapt the training data reader and emulator for wit.ai to their latest format Oct 28, 2020
Copy link
Contributor

@ricwo ricwo left a comment

Choose a reason for hiding this comment

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

Looks great 🎉

@@ -0,0 +1,4 @@
Adapt the training data reader and emulator for wit.ai to their latest format.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be very helpful to link to the wit.ai page where this format is documented

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, there is no place where the format is described (or I was unable to find it)

rm -r data/*
mv /path/to/expressions.json data/
rm -rf data/
mv /path/to/utterances data/
Copy link
Contributor

Choose a reason for hiding this comment

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

but /data won't exist given that you've rm -rf-ed it in the line before 😛

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 way it would create the directory and move it's content to data/
(you can treat is as renaming — we are basically renaming /path/to/utterances directory here to data)

Comment on lines 27 to 28
"""Transform data to wit.ai format."""

Copy link
Contributor

Choose a reason for hiding this comment

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

should we use a complete docstring?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree but I would say the method we're overriding (the one from NoEmulator) needs to be documented instead. Will do that!

rasa/shared/nlu/training_data/formats/wit.py Show resolved Hide resolved
@rasabot rasabot requested review from a team and tmbo and removed request for a team October 30, 2020 10:12
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 👍

@rasabot rasabot merged commit eb8c366 into master Oct 30, 2020
@rasabot rasabot deleted the wit-training-data branch October 30, 2020 18:09
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.

5 participants