Refactor/emcomposition/externalmemorymechanisms#3595
Merged
Conversation
…APH' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/emcomposition/externalmemorymechanisms_SHOW_GRAPH # Conflicts: # psyneulink/library/models/Giallanza2024_EGO_Study2.py
…Link into refactor/emcomposition/externalmemorymechanisms
…Link into refactor/emcomposition/externalmemorymechanisms
…Link into refactor/emcomposition/externalmemorymechanisms
… option to EMComposition - Fix gradient flow for GRUComposition + EMComposition in both full_sequence_mode (full BPTT) and ordinary trial-by-trial mode; add consolidated equivalence tests against pure-PyTorch references (tests/composition/test_gru_em.py). - Add differentiable_storage option to EMComposition (default False): stores keep their autograd graph so gradients flow back through stored entries (ESBN-style, Webb et al. 2021), instead of only through the retrieval query (Giallanza-style). Documented in EMComposition docs; warning if enabled without full_sequence_mode, where it can have no effect. Minimal ESBN-style equivalence tests in tests/composition/test_em_differentiable_storage.py. - Fix RETRIEVE operation to return actual memory norms (not zeros) so the MIN_NORM_INDEX used by STORE selects the correct entry to replace. - Gitignore local thesis scripts and show_graph output artifacts. Co-authored-by: Cursor <cursoragent@cursor.com>
Style-only whitespace fixes flagged by CI: missing whitespace around arithmetic operators, missing whitespace after keyword, and trailing whitespace in docstrings/comments. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
emcomposition.py imported torch unconditionally at module scope, breaking the whole psyneulink import chain when torch isn't installed (torch is only actually used inside a function gated on torch_available).
…incetonUniversity/PsyNeuLink into refactor/emcomposition/externalmemorymechanisms
- add differentiable_storage option (default False): stores keep their autograd graph so gradients flow back through stored entries (ESBN-style, Webb et al. 2021), instead of only through the retrieval query (Giallanza-style). Warning if enabled withoutfull_sequence_mode, where it can have no effect. Minimal ESBN-style equivalence tests intests/composition/test_em_differentiable_storage.py.
- fix RETRIEVE operation to return actual memory norms (not zeros) so the MIN_NORM_INDEX used by STORE selects the correct entry to replace.
• GRUcomposition.py
- Fix gradient flow for GRUComposition + EMComposition in both full_sequence_mode(full BPTT) and ordinary trial-by-trial mode;
- add tests against pure-PyTorch references (tests/composition/test_gru_em.py).
…Link into refactor/emcomposition/externalmemorymechanisms # Conflicts: # .gitignore
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
This PR causes the following changes to the html docs (ubuntu-latest-3.11): See CI logs for the full diff. |
…ps://github.com/PrincetonUniversity/PsyNeuLink into refactor/emcomposition/externalmemorymechanisms
• test_giallanza_ego: catch exception fo missing torch.mps.manual_seed
|
This PR causes the following changes to the html docs (ubuntu-latest-3.11): See CI logs for the full diff. |
• test_giallanza_ego: catch exception fo missing torch.mps.manual_seed
…ps://github.com/PrincetonUniversity/PsyNeuLink into refactor/emcomposition/externalmemorymechanisms
|
This PR causes the following changes to the html docs (ubuntu-latest-3.11): See CI logs for the full diff. |
…ps://github.com/PrincetonUniversity/PsyNeuLink into refactor/emcomposition/externalmemorymechanisms
|
This PR causes the following changes to the html docs (ubuntu-latest-3.11): See CI logs for the full diff. |
…on/externalmemorymechanisms
Convert the Giallanza EGO test inputs to NumPy before passing them through PsyNeuLink's input parser, avoiding failures with the older Torch and NumPy versions used by Python 3.8 jobs. Skip the known-unsupported EMComposition MDF conversions instead of marking them xfail. On Windows/Python 3.8, dill can hit a native stack overflow while traversing recursive WeakSet state, killing the xdist worker before xfail can handle the error. Update the nested PyTorch show_graph expectation to exclude a projection owned by another composition, and restore .asv/ to .gitignore.
|
This PR causes the following changes to the html docs (ubuntu-latest-3.11): See CI logs for the full diff. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
• emcomposition.py:
• GRUcomposition.py