(args: argparse.Namespace)
| 989 | |
| 990 | |
| 991 | def get_error_thresholds(args: argparse.Namespace) -> npt.NDArray[np.floating]: |
| 992 | if args.error_type.startswith("relative"): |
| 993 | return np.array(args.rel_error_thresholds) |
| 994 | elif args.error_type.startswith("absolute"): |
| 995 | return np.array(args.abs_error_thresholds) |
| 996 | else: |
| 997 | raise ValueError(f"Invalid error type: {args.error_type}") |
| 998 | |
| 999 | |
| 1000 | def get_scores(error_type: str, metrics: Metrics) -> npt.NDArray[np.floating]: |