MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / main

Function main

scripts/jev_evaluation_runner.py:573–598  ·  view source on GitHub ↗

Evaluate a dataset file and print the report as JSON.

(argv: Sequence[str] | None = None)

Source from the content-addressed store, hash-verified

571
572
573def main(argv: Sequence[str] | None = None) -> int:
574 """Evaluate a dataset file and print the report as JSON."""
575 parser = argparse.ArgumentParser(
576 description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
577 )
578 parser.add_argument("dataset", type=Path, help="a .jsonl or .json file")
579 parser.add_argument("--min-confidence", type=float, required=True)
580 parser.add_argument("--noul-threshold", type=float, required=True)
581 parser.add_argument(
582 "--route",
583 action="append",
584 dest="routes",
585 help="a known route; repeat for each (default: every expected_route)",
586 )
587 args = parser.parse_args(argv)
588 try:
589 report = evaluate(
590 load_dataset(args.dataset),
591 min_confidence=args.min_confidence,
592 noul_threshold=args.noul_threshold,
593 routes=args.routes,
594 )
595 except (OSError, ValueError) as e:
596 parser.error(str(e))
597 print(report.model_dump_json(indent=2))
598 return 0
599
600
601if __name__ == "__main__":

Callers 1

Calls 2

evaluateFunction · 0.85
load_datasetFunction · 0.85

Tested by

no test coverage detected