medcat.utils.regression.regression_checker
Functions:
-
main–Check test suite against the specifeid model pack.
-
show_description– -
tuple3_parser–
Attributes:
-
DEFAULT_TEST_SUITE_PATH– -
args– -
logger– -
parser–
DEFAULT_TEST_SUITE_PATH
module-attribute
DEFAULT_TEST_SUITE_PATH = Path('configs', 'default_regression_tests.yml')
args
module-attribute
args = parse_args()
main
main(model_pack_dir: Path, test_suite_file: Path, phrases: bool = False, hide_empty: bool = False, examples_strictness_str: str = 'STRICTEST', jsonpath: Optional[Path] = None, overwrite: bool = False, jsonindent: Optional[int] = None, strictness_str: str = 'NORMAL', max_phrase_length: int = 80, use_mct_export: bool = False, mct_export_yaml_path: Optional[str] = None, only_mct_export_conversion: bool = False, only_describe: bool = False, require_fully_correct: bool = False, edit_distance: tuple[int, int, int] = (0, 0, 0)) -> None
Check test suite against the specifeid model pack.
Parameters:
-
(model_pack_dirPath) –The path to the model pack
-
(test_suite_filePath) –The path to the test suite YAML
-
(phrasesbool, default:False) –Whether to show per-phrase information in a report
-
(hide_emptybool, default:False) –Whether to hide empty cases in a report
-
(examples_strictness_strstr, default:'STRICTEST') –The example strictness string. Defaults to STRICTEST. NOTE: If you set this to 'None', examples will be omitted.
-
(jsonpathOptional[Path], default:None) –The json path to save the report to (if specified)
-
(overwritebool, default:False) –Whether to overwrite the file if it exists. Defaults to False
-
(jsonindentint, default:None) –The indentation for json objects. Defaults to 0
-
(strictness_strstr, default:'NORMAL') –The strictness name. Defaults to NORMAL.
-
(max_phrase_lengthint, default:80) –The maximum phrase length in examples. Defaults to 80.
-
(use_mct_exportbool, default:False) –Whether to use a MedCATtrainer export as input. Defaults to False.
-
(mct_export_yaml_pathstr, default:None) –The (optional) path the converted MCT export should be saved as YAML at. If not set (or None), the MCT export is not saved in YAML format. Defaults to None.
-
(only_mct_export_conversionbool, default:False) –Whether to only deal with the MCT export conversion. I.e exit when MCT export conversion is done. Defaults to False.
-
(only_describebool, default:False) –Whether to only describe the finding options and exit. Defaults to False.
-
(require_fully_correctbool, default:False) –Whether all cases are required to be correct. If set to True, an exit-status of 1 is returned unless all (sub)cases are correct. Defaults to False.
-
(edit_distancetuple[int, int, int], default:(0, 0, 0)) –The edit distance, the random seed, and the number of edited names to pick for each of the names. If set to non-0, the specified number of splits, deletes, transposes, replaces, or inserts are done to the each name. This can be useful for looking at the capability of identifying typos in text. However, this can make hte process a lot slower as a result. Defaults to (0, 0, 0).
Raises:
-
ValueError–If unable to overwrite file or folder does not exist.
Source code in medcat-v2/medcat/utils/regression/regression_checker.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
show_description
show_description()
Source code in medcat-v2/medcat/utils/regression/regression_checker.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
tuple3_parser
Source code in medcat-v2/medcat/utils/regression/regression_checker.py
151 152 153 154 155 156 157 158 | |