Skip to content

Commit 8bd7e52

Browse files
author
Christina Koss
committed
improved docstring according to review suggestions
1 parent b346bc2 commit 8bd7e52

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

rasa/test.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@ def test_core_models_in_directory(
3333

3434

3535
def _get_sanitized_model_directory(model_directory: Text) -> Text:
36-
"""Adjusts the '--model' argument of 'rasa test core' when called with '--evaluate-model-directory'.
36+
"""Adjusts the `--model` argument of `rasa test core` when called with `--evaluate-model-directory`.
3737
38-
If a file is passed as 'model_directory' to 'test_core_models_in_directory' instead of a directory, returns the
39-
directory that file is contained in. Prints a warning if the file is not the latest model. If the passed
40-
'model_directory' is the latest model, it's probably caused by the default value of the CLI. Doesn't warn in this
41-
case.
42-
If anything other than an existing file is passed as 'model_directory' to 'test_core_models_in, returns the
43-
'model_directory' argument as is.
38+
By default rasa uses the latest model for the `--model` parameter. However, for `--evaluate-model-directory` we
39+
need a directory. This function checks if the passed parameter is a model or an individual model file.
4440
4541
Args:
46-
model_directory: the 'model_directory' argument that was given to 'test_core_models_in_directory'
42+
model_directory: The model_directory argument that was given to `test_core_models_in_directory`.
4743
4844
Returns:
49-
The adjusted model_directory that should be used in 'test_core_models_in_directory'
45+
The adjusted model_directory that should be used in `test_core_models_in_directory`.
5046
"""
5147
import rasa.model
5248

0 commit comments

Comments
 (0)