(
tmp_path: Union[Path, Text], epochs: int, max_history: Optional[int] = -1
)
| 21 | |
| 22 | |
| 23 | def _custom_default_config( |
| 24 | tmp_path: Union[Path, Text], epochs: int, max_history: Optional[int] = -1 |
| 25 | ) -> Text: |
| 26 | # Override default config to use custom amount of epochs |
| 27 | default_config = Path("rasa", "shared", "importers", "default_config.yml") |
| 28 | config = rasa.shared.utils.io.read_yaml_file(default_config) |
| 29 | |
| 30 | for model_part, items in config.items(): |
| 31 | for item in items: |
| 32 | if "epochs" in item: |
| 33 | item["epochs"] = epochs |
| 34 | if "max_history" in item and max_history != -1: |
| 35 | item["max_history"] = None |
| 36 | |
| 37 | config_for_test = Path(tmp_path) / "test_config.yml" |
| 38 | rasa.shared.utils.io.write_yaml(config, config_for_test) |
| 39 | |
| 40 | return str(config_for_test) |
| 41 | |
| 42 | |
| 43 | class MemoryLeakTest(abc.ABC): |
no test coverage detected
searching dependent graphs…