add err hint
This commit is contained in:
parent
aec946b119
commit
a51b8ec620
|
@ -157,7 +157,6 @@ cython_debug/
|
||||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
# The ".idea" folder can generally be ignored directly.
|
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# custom .gitignore
|
# custom .gitignore
|
||||||
|
|
|
@ -89,12 +89,12 @@ def list_checkpoint(model_name: str, finetuning_type: str) -> Dict[str, Any]:
|
||||||
return gr.update(value=[], choices=checkpoints)
|
return gr.update(value=[], choices=checkpoints)
|
||||||
|
|
||||||
|
|
||||||
def load_dataset_info(dataset_dir: str) -> Dict[str, Any]:
|
def load_dataset_info(dataset_dir: str) -> Dict[str, Dict[str, Any]]:
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(dataset_dir, DATA_CONFIG), "r", encoding="utf-8") as f:
|
with open(os.path.join(dataset_dir, DATA_CONFIG), "r", encoding="utf-8") as f:
|
||||||
return json.load(f)
|
return json.load(f)
|
||||||
except:
|
except Exception as err:
|
||||||
print("Cannot find {} in {}.".format(DATA_CONFIG, dataset_dir))
|
print("Cannot open {} in {} due to {}.".format(DATA_CONFIG, dataset_dir, str(err)))
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue