Load default_model_config_lazily #653
Open
+301
−272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to lazily load default model configurations and registered models. The main changes involve replacing direct dictionary access with function calls to improve performance and maintainability.
Key changes include:
Configuration Management:
get_default_model_config
anddefault_model_config
functions to lazily load and cache default model configurations insrc/hssm/defaults.py
. [1] [2]Code Refactoring:
default_model_config
function instead of directly accessing thedefault_model_config
dictionary insrc/hssm/config.py
,src/hssm/plotting/model_cartoon.py
, andtests/param/test_params.py
. [1] [2] [3] [4] [5] [6] [7] [8] [9]Model Registration:
registered_models
function instead of directly accessing theregistered_models
dictionary insrc/hssm/register.py
andtests/test_register.py
. [1] [2] [3] [4]