Spaces:
Running
Running
Update process results (#15)
Browse files- Update process results (233ccb64b97238b17e2e7e9e5be38519b1078099)
24 unmodified lines2526272829303132333435363711 unmodified lines4950515253545524 unmodified linesTasks.NATURAL_LANGUAGE_INFERENCE,Tasks.TEXT_CLASSIFICATION,):processed['acc'] = entry['acc,none']processed['acc_norm'] = entry.get('acc_norm,none', processed['acc'])elif task == Tasks.MACHINE_TRANSLATION:processed['wer'] = entry['wer,none']processed['bleu'] = entry['bleu,none']elif task == Tasks.GRAMMATICAL_ERROR_CORRECTION:processed['exact_match'] = entry['exact_match,none']return processed11 unmodified linesmodel_args = raw_data['config']['model_args'].split(',')model_args = dict([tuple(pair.split('=')) for pair in model_args])processed = dict()model_args['model'] = model_args.pop('pretrained')processed['model'] = model_argsprocessed['model']['api'] = raw_data['config']['model']24 unmodified lines25262728293031323334353637383940414211 unmodified lines5455565758596024 unmodified linesTasks.NATURAL_LANGUAGE_INFERENCE,Tasks.TEXT_CLASSIFICATION,):if 'acc,none' in entry:processed['acc'] = entry['acc,none']processed['acc_norm'] = entry.get('acc_norm,none', processed['acc'])else:processed['acc'] = entry['exact_match,get_result']processed['acc_norm'] = processed['acc']elif task == Tasks.MACHINE_TRANSLATION:processed['wer'] = entry['wer,none']processed['bleu'] = entry['bleu,none']elif task == Tasks.GRAMMATICAL_ERROR_CORRECTION:processed['exact_match'] = entry['exact_match,regex_filter_applies_strip_internally']return processed11 unmodified linesmodel_args = raw_data['config']['model_args'].split(',')model_args = dict([tuple(pair.split('=')) for pair in model_args])processed = dict()model_args['model'] = model_args.get('pretrained', '')processed['model'] = model_argsprocessed['model']['api'] = raw_data['config']['model']
process_result.py+9-4