Update eval.py
Browse files
eval.py
CHANGED
@@ -50,9 +50,9 @@ def paper_term_mapping(commonsense_constraint_record, hard_constraint_record):
|
|
50 |
def eval_score(validation_or_test: str, file_path: str, TOKEN):
|
51 |
|
52 |
if validation_or_test == 'validation':
|
53 |
-
query_data_list = load_dataset('osunlp/TravelPlannerEval','validation',token=TOKEN)['validation']
|
54 |
elif validation_or_test == 'test':
|
55 |
-
query_data_list = load_dataset('osunlp/TravelPlannerEval','test',token=TOKEN)['test']
|
56 |
|
57 |
query_data_list = [x for x in query_data_list]
|
58 |
hardConstraint_statistic= {level:{day:[] for day in [3,5,7]} for level in ['easy','medium','hard']}
|
|
|
50 |
def eval_score(validation_or_test: str, file_path: str, TOKEN):
|
51 |
|
52 |
if validation_or_test == 'validation':
|
53 |
+
query_data_list = load_dataset('osunlp/TravelPlannerEval','validation',token=TOKEN, download_mode="force_redownload")['validation']
|
54 |
elif validation_or_test == 'test':
|
55 |
+
query_data_list = load_dataset('osunlp/TravelPlannerEval','test',token=TOKEN, download_mode="force_redownload")['test']
|
56 |
|
57 |
query_data_list = [x for x in query_data_list]
|
58 |
hardConstraint_statistic= {level:{day:[] for day in [3,5,7]} for level in ['easy','medium','hard']}
|