File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
backend/src/impl/db_utils Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -205,11 +205,12 @@ def generate_dataframe_from_sys_infos(
205
205
dataset_metadatas : list [DatasetMetadata ] = []
206
206
for x in dataset_configs :
207
207
dataset_return = DatasetDBUtils .find_datasets (
208
- dataset_name = x ["dataset_name" ], sub_dataset = x [ "sub_dataset" ]
208
+ dataset_name = x ["dataset_name" ], sub_dataset = x . get ( "sub_dataset" , None )
209
209
)
210
210
if dataset_return .total != 1 :
211
211
raise ValueError (
212
- f'Could not find dataset { x ["dataset_name" ]} , { x ["sub_dataset" ]} '
212
+ f"Could not find dataset "
213
+ f'{ x ["dataset_name" ]} , { x .get ("sub_dataset" , None )} '
213
214
)
214
215
dataset_metadatas .append (dataset_return .datasets [0 ])
215
216
@@ -300,6 +301,8 @@ def generate_dataframe_from_sys_infos(
300
301
for df_key , df_arr in df_input .items ():
301
302
if df_key in column_dict :
302
303
info = column_dict [df_key ]
304
+ elif df_key == "sub_dataset" :
305
+ info = None
303
306
elif df_key == "dataset_split" :
304
307
info = "test"
305
308
elif df_key == "source_language" :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ openapi: "3.0.0"
2
2
info :
3
3
title : " ExplainaBoard"
4
4
description : " Backend APIs for ExplainaBoard"
5
- version : " 0.2.19 "
5
+ version : " 0.2.20 "
6
6
contact :
7
7
8
8
license :
@@ -1398,14 +1398,15 @@ components:
1398
1398
properties :
1399
1399
dataset_name :
1400
1400
type : string
1401
- sub_dataset :
1402
- type : string
1403
1401
split :
1404
1402
type : string
1405
1403
metrics :
1406
1404
type : array
1407
1405
items :
1408
1406
$ref : ' #/components/schemas/BenchmarkMetric'
1407
+ sub_dataset :
1408
+ type : string
1409
+ nullable : true
1409
1410
additionalProperties : true
1410
1411
required : [dataset_name]
1411
1412
You can’t perform that action at this time.
0 commit comments