-
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
for "rasa test core --evaluate-model-directory" set default for "--model" to directory #5122
Conversation
…e as --model, use the folder that file is in as --model instead
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.
Congrats to your first PR 🎉
Regarding the side-effect which you mentioned (thanks for pointing this ambiguous behavior out!):
how about checking the passed model is != model.get_latest_model(directory)
(the function is in the module rasa.model
) and then print a warning. In case the passed model name is == model.get_latest_model(directory)
we can assume it's the default model and wasn't explicitly passed in by the user.
….path; add return types
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.
Nice work with all the pytest fixtures! 💯
Co-Authored-By: Tobias Wochinger <[email protected]>
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.
Great work 🎉 See the open comments, but looks very great!
🎉 |
Proposed changes:
If rasa test core is called with --evaluate-model-directory and a file as --model, use the folder that file is in as --model instead.
This fixes #4896 : When no --model argument is given, instead of defaulting to the latest model in ./models it now defaults to ./models
Side effect: When called with "--model some_folder/some_file.tar.gz", it uses some_folder as --model instead. Is this something we want? If yes, should the code throw a warning like "you provided a file as --model, will use the folder that file is in instead"?
Status (please check what you already did):
black
(please check Readme for instructions)