-
Notifications
You must be signed in to change notification settings - Fork 21
Cpaniaguam/rlssm simplified interface #955
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
Open
cpaniaguam
wants to merge
42
commits into
main
Choose a base branch
from
cpaniaguam/rlssm-simplified-interface
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
b152169
Update init files
cpaniaguam c3a09be
Add registry
cpaniaguam e4fb4ac
Update rlssm module
cpaniaguam 9dc18ac
Add tests for simplified RLSSM interface and model registration
cpaniaguam 413fe36
Fix condition in RLSSM class to handle model configuration correctly
cpaniaguam 19a39aa
Implement lazy loading for SSM base log-likelihood functions and add …
cpaniaguam 301cd13
Enhance error handling and validation in RLSSM and SSM registry
cpaniaguam b23c8c2
Refactor RLSSM model configuration to respect explicit empty containe…
cpaniaguam 78bd5c5
Add validation to prevent registration of SSM functions with non-empt…
cpaniaguam 00638ca
Refactor SSM registry to convert parameters to appropriate types for …
cpaniaguam 101444e
Update error message in get_rlssm_model_config to clarify custom mode…
cpaniaguam 91b2572
Use more transparent terminology
cpaniaguam c82db43
Implement defensive copying for decision process specifications in RL…
cpaniaguam 9310e88
Refactor SSM registry documentation and enhance SSM base log-likeliho…
cpaniaguam 5b5b380
Add unit tests for RL registry helpers to validate model registration…
cpaniaguam 486076b
Move rl-related tests to rl directory
cpaniaguam e29e731
Add extra tests to increase test coverage
cpaniaguam d12594f
Update RLSSM registry to include 2AB Rescorla-Wagner model
cpaniaguam 215f50f
Remove redundant classproperty decorator
cpaniaguam 434a27c
Add list_models to public API documentation in __init__.py
cpaniaguam a3d910b
Add 2AB Rescorla-Wagner models to RLSSM registry and implement list_m…
cpaniaguam 10cd59e
Update RLSSM model default and add classproperty for listing models
cpaniaguam a34a766
Update RLSSM tests to validate 2AB Rescorla-Wagner model instantiatio…
cpaniaguam d8c9359
Raise error for missing SSM bounds in get_rlssm_model_config to preve…
cpaniaguam f99a533
Clarify documentation for RLSSM registry and update example usage for…
cpaniaguam 918548c
Update model check in RLSSM constructor to use specific model name fo…
cpaniaguam 1a1cd24
Merge branch 'main' into cpaniaguam/rlssm-simplified-interface
cpaniaguam 3626f4d
fix: ensure defensive copying of learning process and choices in RLSS…
cpaniaguam f3a94d6
fix: update choices assertion to use tuple format in test_builtin_2ab…
cpaniaguam 54cebfe
chore: remove unnecessary comments
cpaniaguam 08ba693
refactor: clean up test_rlssm.py by removing unnecessary comments and…
cpaniaguam 1e987d5
Improve model_config handling in RLSSM class
cpaniaguam 80d3c98
fix: update logger initialization to use module name for better context
cpaniaguam abd86dc
fix: simplify parameter default calculation in _build_ssm_spec_from_m…
cpaniaguam aac4f6f
fix: optimize SSM logp retrieval by caching and restructuring conditi…
cpaniaguam 1042c70
fix: streamline parameter filtering in get_rlssm_model_config by usin…
cpaniaguam 5320621
fix: enhance RLSSM registry tests with improved error handling and ca…
cpaniaguam bc9c88f
fix: rename _derive_rl_params to _derive_lp_params
cpaniaguam b47d9db
Rename rl_params to learning_process_params
cpaniaguam 4973e8a
Fix line too long
cpaniaguam 52d5fd6
Rename rl_bounds to learning_process_bounds
cpaniaguam fe0be81
Rename rl_params_default to learning_process_params_default
cpaniaguam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,12 @@ | |
|
|
||
| Public API (import from ``hssm.rl``): | ||
|
|
||
| - ``RLSSM``: the RL + SSM model class implemented in :mod:`hssm.rl.rlssm`. | ||
| - ``RLSSMConfig``: the config class for RL + SSM models, implemented in | ||
| :mod:`hssm.rl.config`. | ||
| - ``RLSSM``: the public RL + SSM model class in :mod:`hssm.rl.rlssm`. | ||
| - ``_RLSSM``: the internal base class that requires a fully built config. | ||
| - ``RLSSMConfig``: the config class for RL + SSM models in :mod:`hssm.rl.config`. | ||
| - ``get_rlssm_model_config``: factory that builds a config from a named model. | ||
| - ``register_rlssm_model``: register a custom named RLSSM model. | ||
| - ``register_ssm``: register a custom SSM base logp function. | ||
| - ``validate_balanced_panel``: panel-balance utility in :mod:`hssm.rl.utils`. | ||
|
|
||
| RL likelihood builders live in :mod:`hssm.rl.likelihoods.builder` and include | ||
|
|
@@ -17,11 +20,20 @@ | |
| """ | ||
|
|
||
| from .config import RLSSMConfig | ||
| from .rlssm import RLSSM | ||
| from .registry import ( | ||
| get_rlssm_model_config, | ||
| register_rlssm_model, | ||
| register_ssm, | ||
| ) | ||
| from .rlssm import _RLSSM, RLSSM | ||
| from .utils import validate_balanced_panel | ||
|
|
||
| __all__ = [ | ||
| "RLSSM", | ||
| "_RLSSM", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name "_RLSSM" suggests that this class is "private" and should not directly be accessed by the user, so it should not be exposed in |
||
| "RLSSMConfig", | ||
| "get_rlssm_model_config", | ||
| "register_rlssm_model", | ||
| "register_ssm", | ||
| "validate_balanced_panel", | ||
| ] | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would we want/need a
register_learning_processequivalent here? ( @krishnbera )There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes we should have a way of registering the learning process separately.