MCPcopy
hub / github.com/RasaHQ/rasa / _cross_validate

Function _cross_validate

rasa/server.py:1219–1237  ·  view source on GitHub ↗
(data_file: Text, config_file: Text, folds: int)

Source from the content-addressed store, hash-verified

1217 )
1218
1219 async def _cross_validate(data_file: Text, config_file: Text, folds: int) -> Dict:
1220 logger.info(f"Starting cross-validation with {folds} folds.")
1221 importer = TrainingDataImporter.load_from_dict(
1222 config=None, config_path=config_file, training_data_paths=[data_file]
1223 )
1224 config = importer.get_config()
1225 nlu_data = importer.get_nlu_data()
1226
1227 evaluations = await rasa.nlu.test.cross_validate(
1228 data=nlu_data,
1229 n_folds=folds,
1230 nlu_config=config,
1231 disable_plotting=True,
1232 errors=True,
1233 report_as_dict=True,
1234 )
1235 evaluation_results = _get_evaluation_results(*evaluations)
1236
1237 return evaluation_results
1238
1239 def _get_evaluation_results(
1240 intent_report: CVEvaluationResult,

Callers 1

evaluate_intentsFunction · 0.85

Calls 4

_get_evaluation_resultsFunction · 0.85
load_from_dictMethod · 0.80
get_configMethod · 0.45
get_nlu_dataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…