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 6ead2b5 commit 10ba930Copy full SHA for 10ba930
open_lm/model.py
@@ -68,8 +68,11 @@ def _rescan_model_configs(model_config_paths=None):
68
69
for cf in config_files:
70
with open(cf, "r") as f:
71
- model_cfg = json.load(f)
72
- _MODEL_CONFIGS[cf.stem] = model_cfg
+ try:
+ model_cfg = json.load(f)
73
+ _MODEL_CONFIGS[cf.stem] = model_cfg
74
+ except json.JSONDecodeError:
75
+ print(f"Error loading model config {cf}")
76
77
_MODEL_CONFIGS = {k: v for k, v in sorted(_MODEL_CONFIGS.items(), key=lambda x: _natural_key(x[0]))}
78
0 commit comments