Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load default_model_config_lazily #653

Open
wants to merge 4 commits into
base: 644-implement-model-registrator
Choose a base branch
from

Conversation

cpaniaguam
Copy link
Collaborator

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:

  • Introduced get_default_model_config and default_model_config functions to lazily load and cache default model configurations in src/hssm/defaults.py. [1] [2]

Code Refactoring:

  • Updated various functions to use the default_model_config function instead of directly accessing the default_model_config dictionary in src/hssm/config.py, src/hssm/plotting/model_cartoon.py, and tests/param/test_params.py. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Model Registration:

  • Updated functions to use the registered_models function instead of directly accessing the registered_models dictionary in src/hssm/register.py and tests/test_register.py. [1] [2] [3] [4]

@AlexanderFengler
Copy link
Collaborator

Ok I guess this PR and #655 are linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants