We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4003c7 commit 6277b33Copy full SHA for 6277b33
open_lm/model.py
@@ -67,8 +67,11 @@ def _rescan_model_configs(model_config_paths=None):
67
68
for cf in config_files:
69
with open(cf, "r") as f:
70
- model_cfg = json.load(f)
71
- _MODEL_CONFIGS[cf.stem] = model_cfg
+ try:
+ model_cfg = json.load(f)
72
+ _MODEL_CONFIGS[cf.stem] = model_cfg
73
+ except json.JSONDecodeError:
74
+ print(f"Error loading model config {cf}")
75
76
_MODEL_CONFIGS = {k: v for k, v in sorted(_MODEL_CONFIGS.items(), key=lambda x: _natural_key(x[0]))}
77
0 commit comments