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

Add possibility to split the domain into separate files #6132

Merged
merged 3 commits into from
Jul 8, 2020

Conversation

degiz
Copy link
Contributor

@degiz degiz commented Jul 2, 2020

Closes #5984

Proposed changes:

  • domain file now doesn't have to be called domain.yaml

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 added this to the 2.0 Rasa Open Source milestone Jul 2, 2020
@degiz degiz force-pushed the 5984_domain_split branch 3 times, most recently from 63dc6ad to d50d039 Compare July 7, 2020 13:27
@degiz degiz marked this pull request as ready for review July 7, 2020 13:27
@degiz degiz requested review from federicotdn and removed request for federicotdn July 7, 2020 13:28
@degiz degiz requested a review from federicotdn July 7, 2020 13:34
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.

Works nicely! Some observations:

  • We should update default_arguments.add_domain_param as well. Maybe mention there that the value can be a single YAML file, or a directory containing YAML files.
  • I tried placing three YAML files inside domains/ and then trained my model. However I got this warning below:
FutureWarning: No tracker session configuration was found in the loaded domain. Domains without a session config will automatically receive a session expiration time of 60 minutes in Rasa version 2.0 if not configured otherwise.
  docs=DOCS_URL_DOMAINS + "#session-configuration",

I think this is happening because we're calling Domain.from_dict for each file, so if one of them doesn't have the session_config key, the warning will be shown.

changelog/6132.feature.rst Outdated Show resolved Hide resolved
rasa/core/domain.py Outdated Show resolved Hide resolved
rasa/core/domain.py Outdated Show resolved Hide resolved
rasa/core/domain.py Show resolved Hide resolved
rasa/core/domain.py Show resolved Hide resolved
@degiz
Copy link
Contributor Author

degiz commented Jul 8, 2020

FutureWarning: No tracker session configuration was found in the loaded domain. Domains without a session config will automatically receive a session expiration time of 60 minutes in Rasa version 2.0 if not configured otherwise.
docs=DOCS_URL_DOMAINS + "#session-configuration",

I removed the warning and set the default session expiration time to 60 minutes as of now.

@degiz degiz force-pushed the 5984_domain_split branch 2 times, most recently from cb59637 to 0b7b3d7 Compare July 8, 2020 14:46
@degiz degiz requested a review from federicotdn July 8, 2020 14:46
@degiz
Copy link
Contributor Author

degiz commented Jul 8, 2020

@federicotdn update: used DEFAULT_SESSION_EXPIRATION_TIME_IN_MINUTES everywhere and still keep it as 0 now. This question needs more clarification and I don't want it to block the PR 😬

- Add possibility to split the domain into separate files
@federicotdn
Copy link
Contributor

👍
Let me know if I should review again

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.

👍 👍

rasa/cli/arguments/default_arguments.py Outdated Show resolved Hide resolved
Co-authored-by: Federico Tedin <federicotdn@users.noreply.github.com>
@rasabot rasabot merged commit b932c9f into master Jul 8, 2020
@rasabot rasabot deleted the 5984_domain_split branch July 8, 2020 16:03
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.

New Training Data Format - Domain
3 participants