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

Luis schema version incompatibility #4759

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Changed
- Print info message when running Rasa X and a custom model server url was specified in ``endpoints.yml``
- If a ``wait_time_between_pulls`` is configured for the model server in ``endpoints.yml``,
this will be used instead of the default one when running Rasa X
- Training Luis data with ``luis_schema_version`` higher than 4.x.x will show a warning instead of throwing an exception
Copy link
Member

Choose a reason for hiding this comment

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

we've changed the changelog handling. please do not modify CHANGELOG.rst. instead, please create a new newsfile in changelog/ (more info https://github.com/RasaHQ/rasa/tree/master/changelog)


Removed
-------
Expand Down
14 changes: 7 additions & 7 deletions rasa/nlu/training_data/formats/luis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def read_from_json(self, js: Dict[Text, Any], **kwargs: Any) -> "TrainingData":
training_examples = []
regex_features = []

# Simple check to ensure we support this luis data schema version
if not js["luis_schema_version"].startswith("2"):
raise Exception(
"Invalid luis data schema version {}, "
"should be 2.x.x. "
"Make sure to use the latest luis version "
"(e.g. by downloading your data again)."
luisSchemaVersionChecked = 4
version = int(js["luis_schema_version"].split(".")[0])
if version > luisSchemaVersionChecked:
logger.warning(
imLew marked this conversation as resolved.
Show resolved Hide resolved
"Your luis data schema version {} "
"is higher than 4.x.x. "
"Traning may not be performed correctly. "
"".format(js["luis_schema_version"])
)

Expand Down