Spaces:
Sleeping
Sleeping
XufengDuan
commited on
Commit
•
2924b58
1
Parent(s):
a6b7260
update scripts
Browse files
src/backend/model_operations.py
CHANGED
@@ -1243,18 +1243,20 @@ class EvaluationModel:
|
|
1243 |
save_path = result_save_path.replace('.csv','_coding.csv')
|
1244 |
self.llm_df = self.code_results_llm(summaries_df)
|
1245 |
|
1246 |
-
|
1247 |
-
path_or_fileobj=f"./generation_results/{self.model}_coding.csv",
|
1248 |
-
path_in_repo=f"{self.model}_coding.csv",
|
1249 |
-
repo_id=envs.RESULTS_REPO,
|
1250 |
-
repo_type="dataset",
|
1251 |
-
)
|
1252 |
|
1253 |
if save_path is not None:
|
1254 |
print(f'Save LLM coding results to {save_path}')
|
1255 |
fpath = Path(save_path)
|
1256 |
fpath.parent.mkdir(parents=True, exist_ok=True)
|
1257 |
self.llm_df.to_csv(fpath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1258 |
# file_path_1 = '/Users/simon/Downloads/coding_human.xlsx'
|
1259 |
# file_path_2 = '/Users/simon/Downloads/Meta-Llama-3.1-70B-Instruct_coding.csv'
|
1260 |
avg_js_divergence = self.calculate_js_divergence(human_data_path, save_path)
|
|
|
1243 |
save_path = result_save_path.replace('.csv','_coding.csv')
|
1244 |
self.llm_df = self.code_results_llm(summaries_df)
|
1245 |
|
1246 |
+
|
|
|
|
|
|
|
|
|
|
|
1247 |
|
1248 |
if save_path is not None:
|
1249 |
print(f'Save LLM coding results to {save_path}')
|
1250 |
fpath = Path(save_path)
|
1251 |
fpath.parent.mkdir(parents=True, exist_ok=True)
|
1252 |
self.llm_df.to_csv(fpath)
|
1253 |
+
|
1254 |
+
envs.API.upload_file(
|
1255 |
+
path_or_fileobj=f"./generation_results/{self.model}_coding.csv",
|
1256 |
+
path_in_repo=f"{self.model}_coding.csv",
|
1257 |
+
repo_id=envs.RESULTS_REPO,
|
1258 |
+
repo_type="dataset",
|
1259 |
+
)
|
1260 |
# file_path_1 = '/Users/simon/Downloads/coding_human.xlsx'
|
1261 |
# file_path_2 = '/Users/simon/Downloads/Meta-Llama-3.1-70B-Instruct_coding.csv'
|
1262 |
avg_js_divergence = self.calculate_js_divergence(human_data_path, save_path)
|