Spaces:
Runtime error
Runtime error
christodoulos.constantinides@ibm.com commited on
Commit ·
714d69a
1
Parent(s): 9dfc3ef
update
Browse filesFiles changed (2)
156 unmodified lines157158159160161162163156 unmodified linesdef get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResult]:"""From the path of the results folder root, extract all needed info for results"""model_result_filepaths = []for root, _, files in os.walk(results_path):# We should only have json files in model resultsif len(files) == 0 or any([not f.endswith(".json") for f in files]):156 unmodified lines157158159160161162163156 unmodified linesdef get_raw_eval_results(results_path: str, requests_path: str) -> list[EvalResult]:"""From the path of the results folder root, extract all needed info for results"""model_result_filepaths = []print(results_path)for root, _, files in os.walk(results_path):# We should only have json files in model resultsif len(files) == 0 or any([not f.endswith(".json") for f in files]):
10 unmodified lines11121314151610 unmodified linesdef get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:"""Creates a dataframe from all the individual experiment results"""raw_data = get_raw_eval_results(results_path, requests_path)all_data_json = [v.to_dict() for v in raw_data]df = pd.DataFrame.from_records(all_data_json)10 unmodified lines1112131415161710 unmodified linesdef get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:"""Creates a dataframe from all the individual experiment results"""raw_data = get_raw_eval_results(results_path, requests_path)print(raw_data)all_data_json = [v.to_dict() for v in raw_data]df = pd.DataFrame.from_records(all_data_json)
src/leaderboard/read_evals.py+1-1
src/populate.py+1