Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
|
@@ -276,14 +276,15 @@ with open("dataset_configs.json", "r") as f:
|
|
| 276 |
# CHECK_CONFIGS = get_dataset_config_names(CHECK_DATASET_DIR_PATH_BEFORE_CLEAN_SELECT, use_auth_token=HF_API_TOKEN)
|
| 277 |
|
| 278 |
CLEANING_VERSIONS = set()
|
| 279 |
-
dataset_names = set
|
| 280 |
-
checks_names = set
|
|
|
|
| 281 |
for check_config in CHECK_CONFIGS:
|
| 282 |
cleaning_version, check_config = check_config.split("_dsname_")
|
| 283 |
dataset_name, checks_name = check_config.split("_operation_")
|
| 284 |
CLEANING_VERSIONS.add(cleaning_version)
|
| 285 |
-
dataset_names.add(dataset_name)
|
| 286 |
-
checks_names.add(checks_name)
|
| 287 |
|
| 288 |
# CLEANING_VERSIONS = sorted(list(os.listdir(DATASET_DIR_PATH_BEFORE_CLEAN_SELECT)), reverse=True)
|
| 289 |
option_clean = col_option_clean.selectbox(
|
|
@@ -292,7 +293,7 @@ option_clean = col_option_clean.selectbox(
|
|
| 292 |
|
| 293 |
# DATASET_DIR_PATH = os.path.join(DATASET_DIR_PATH_BEFORE_CLEAN_SELECT, option_clean)
|
| 294 |
# dataset_names = sorted(list(os.listdir(DATASET_DIR_PATH)))
|
| 295 |
-
option_ds = col_option_ds.selectbox("Select the dataset", dataset_names)
|
| 296 |
|
| 297 |
# checks_path = os.path.join(DATASET_DIR_PATH, option_ds, "checks")
|
| 298 |
# checks_names = sorted(list(os.listdir(checks_path)))
|
|
@@ -302,7 +303,7 @@ ds_log = load_dataset(LOGS_DATASET_DIR_PATH_BEFORE_CLEAN_SELECT, f"{option_clean
|
|
| 302 |
log = ds_log["train"][0]["log"]
|
| 303 |
get_logs_stats(raw_log=log)
|
| 304 |
|
| 305 |
-
option_check = st.selectbox("Select the operation applied to inspect", checks_names)
|
| 306 |
|
| 307 |
ds_check_config = f"{option_clean}_dsname_{option_ds}_operation_{option_check}"
|
| 308 |
|
|
|
|
| 276 |
# CHECK_CONFIGS = get_dataset_config_names(CHECK_DATASET_DIR_PATH_BEFORE_CLEAN_SELECT, use_auth_token=HF_API_TOKEN)
|
| 277 |
|
| 278 |
CLEANING_VERSIONS = set()
|
| 279 |
+
dataset_names = defaultdict(set)
|
| 280 |
+
checks_names = defaultdict(lambda: defaultdict(set))
|
| 281 |
+
|
| 282 |
for check_config in CHECK_CONFIGS:
|
| 283 |
cleaning_version, check_config = check_config.split("_dsname_")
|
| 284 |
dataset_name, checks_name = check_config.split("_operation_")
|
| 285 |
CLEANING_VERSIONS.add(cleaning_version)
|
| 286 |
+
dataset_names[cleaning_version].add(dataset_name)
|
| 287 |
+
checks_names[cleaning_version][dataset_name].add(checks_name)
|
| 288 |
|
| 289 |
# CLEANING_VERSIONS = sorted(list(os.listdir(DATASET_DIR_PATH_BEFORE_CLEAN_SELECT)), reverse=True)
|
| 290 |
option_clean = col_option_clean.selectbox(
|
|
|
|
| 293 |
|
| 294 |
# DATASET_DIR_PATH = os.path.join(DATASET_DIR_PATH_BEFORE_CLEAN_SELECT, option_clean)
|
| 295 |
# dataset_names = sorted(list(os.listdir(DATASET_DIR_PATH)))
|
| 296 |
+
option_ds = col_option_ds.selectbox("Select the dataset", dataset_names[option_clean])
|
| 297 |
|
| 298 |
# checks_path = os.path.join(DATASET_DIR_PATH, option_ds, "checks")
|
| 299 |
# checks_names = sorted(list(os.listdir(checks_path)))
|
|
|
|
| 303 |
log = ds_log["train"][0]["log"]
|
| 304 |
get_logs_stats(raw_log=log)
|
| 305 |
|
| 306 |
+
option_check = st.selectbox("Select the operation applied to inspect", checks_names[option_clean][option_ds])
|
| 307 |
|
| 308 |
ds_check_config = f"{option_clean}_dsname_{option_ds}_operation_{option_check}"
|
| 309 |
|