Method validate_data: validates that all files in the results folder are correct (have the correct name contents). Validates also that there are no missing files in the folder. If some error detected, the method raises the error
(gtFilePath, submFilePath, evaluationParams)
| 37 | |
| 38 | |
| 39 | def validate_data(gtFilePath, submFilePath, evaluationParams): |
| 40 | """ |
| 41 | Method validate_data: validates that all files in the results folder are correct (have the correct name contents). |
| 42 | Validates also that there are no missing files in the folder. |
| 43 | If some error detected, the method raises the error |
| 44 | """ |
| 45 | gt = rrc_evaluation_funcs.load_zip_file(gtFilePath, evaluationParams['GT_SAMPLE_NAME_2_ID']) |
| 46 | |
| 47 | subm = rrc_evaluation_funcs.load_zip_file(submFilePath, evaluationParams['DET_SAMPLE_NAME_2_ID'], True) |
| 48 | |
| 49 | # Validate format of GroundTruth |
| 50 | for k in gt: |
| 51 | rrc_evaluation_funcs.validate_lines_in_file(k, gt[k], evaluationParams['CRLF'], True, True) |
| 52 | |
| 53 | # Validate format of results |
| 54 | for k in subm: |
| 55 | if (k in gt) == False: |
| 56 | raise Exception("The sample %s not present in GT" % k) |
| 57 | |
| 58 | rrc_evaluation_funcs.validate_lines_in_file(k, subm[k], evaluationParams['CRLF'], True, True) |
| 59 | |
| 60 | |
| 61 | def evaluate_method(gtFilePath, submFilePath, evaluationParams): |
nothing calls this directly
no outgoing calls
no test coverage detected