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

644 implement model registrator #651

Merged
merged 19 commits into from
Feb 10, 2025
Merged

Conversation

cpaniaguam
Copy link
Collaborator

This pull request introduces model registration functionality.

Model Registration:

  • Added a new module register.py for registering custom models in HSSM, including functions register_model, list_registered_models, and get_model_info.
  • Updated src/hssm/__init__.py to include the register_model function. [1] [2]
  • Tests

Other updates

Dependency Updates:

  • Added ipython, nbconvert, and ptpython to the dev dependencies in pyproject.toml. [1] [2]

Initialization Refactoring:

  • Refactored the __init__ method in src/hssm/hssm.py to use a dictionary comprehension for initializing self._init_args.

@cpaniaguam cpaniaguam linked an issue Feb 6, 2025 that may be closed by this pull request
Copy link
Collaborator

@digicosmos86 digicosmos86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I really like how clean it is, and it is exactly what we were thinking of.

Taking this further, we can now move on to thinking about how not to modify the default_model_config object (it is really supposed to be read-only) and also lazy-loading only certain model configs as needed, but this is already pretty great!

src/hssm/register.py Outdated Show resolved Hide resolved
src/hssm/register.py Outdated Show resolved Hide resolved
src/hssm/register.py Outdated Show resolved Hide resolved
src/hssm/register.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/hssm/register.py 94.11% 1 Missing ⚠️
tests/test_register.py 94.11% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/hssm/__init__.py 100.00% <100.00%> (ø)
src/hssm/hssm.py 77.60% <100.00%> (+0.06%) ⬆️
src/hssm/register.py 94.11% <94.11%> (ø)
tests/test_register.py 94.11% <94.11%> (ø)

Copy link
Collaborator

@digicosmos86 digicosmos86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@cpaniaguam cpaniaguam merged commit 03ba14b into main Feb 10, 2025
5 checks passed
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.

Implement Model Registrator
2 participants