File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,21 @@ def test_core_models_in_directory(
33
33
34
34
35
35
def _get_sanitized_model_directory (model_directory : Text ) -> Text :
36
+ """Adjusts the '--model' argument of 'rasa test core' when called with '--evaluate-model-directory'.
37
+
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.
44
+
45
+ Args:
46
+ model_directory: the 'model_directory' argument that was given to 'test_core_models_in_directory'
47
+
48
+ Returns:
49
+ The adjusted model_directory that should be used in 'test_core_models_in_directory'
50
+ """
36
51
import rasa .model
37
52
38
53
p = Path (model_directory )
You can’t perform that action at this time.
0 commit comments