-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 training cache bug in rasa init
#9990
Fix training cache bug in rasa init
#9990
Conversation
Fixes #9922 When using `rasa init` with a new project directory to be created, current directory was used for caching training data. This meant `.rasa` was created in the directory `rasa init` is run; this resulted in cache directory not in project directory and also that if model training was done, this cache directory was not utilized later on. This PR fixes this by changing into the project directory and then continuing scaffolding and training afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lighning fast! 🏎️ Can we add a test that ensures that if we do rasa init
with train
that the .rasa
folder is in the project dir?
changelog/9922.bugfix.md
Outdated
@@ -0,0 +1,3 @@ | |||
Fix the directory where caching files are created. This was wrongly the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: Up to you but in my opinion we don't even need a changelog as this wasn't even released yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that we don't need this changelog - might be confusing.
tests/cli/test_rasa_init.py
Outdated
Tests cache directories for training data are in project root, not | ||
where `rasa init` is run. | ||
""" | ||
run_with_stdin("init", stdin=b"test-project\n\n\nno\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhm, I saw your comment on Slack re the timing issues. How about we go through print_train_or_instructions
instead of the CLI so we can monkeypatch things to use a quicker model config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
Not sure if you want to also wait for an engineer to review it. Worth asking Joe since he's tagged (I think Tobi is away today).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
changelog/9922.bugfix.md
Outdated
@@ -0,0 +1,3 @@ | |||
Fix the directory where caching files are created. This was wrongly the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that we don't need this changelog - might be confusing.
Fixes #9922
When using
rasa init
with a new project directory to be created,current directory was used for caching training data. This meant
.rasa
was created in the directory
rasa init
is run; this resulted in cachedirectory not in project directory and also that if model training was
done, this cache directory was not utilized later on.
This PR fixes this by changing into the project directory and then
continuing scaffolding and training afterwards.
Proposed changes:
Status (please check what you already did):
black
(please check Readme for instructions)