define hazard_config for default models with a file
Opened this issue · 0 comments
chrisdicaprio commented
"official" models are defined with this pattern:
model_args: Dict[str, Any] = dict(
version='NSHM_v1.0.4',
title="NSHM version 1.0.4, corrected fault geometry",
slt_json="nshm_v1.0.4_v2.json",
gmm_json="gmcm_nshm_v1.0.4.json",
gmm_xml="NZ_NSHM_GMM_LT_final_EE_new_names.xml",
hazard_config=copy.deepcopy(OpenquakeConfig(DEFAULT_HAZARD_CONFIG)),
)
For symmetry and cleaner typing, it would be nice to define the hazard_config
with a file like the other parameters
requires ability to serialize/deserialize config objects #103
done when:
- #103
- models "NSHM_v1.0.0" and "NSHM_v1.0.4" have files in
resources
for their configs - official model definitions use filepaths to the configs