-
Notifications
You must be signed in to change notification settings - Fork 29
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
Feat/ocm/state features #2299
Merged
Merged
Feat/ocm/state features #2299
Conversation
This file contains 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
moved calls to _update_controller to _complete_init_of_partially_initialized_nodes moved _update_controller to ocm._update_state_input_ports _instantiate_controller_shadow_projections [still needs to be implemented] • optimizationcontrolmechanism.py: added _update_state_input_ports [**still needed work**]
…rincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports
added needs_update_controller
- implemented self.needs_update_controller - moved implementation of controlsignal projections from add_controller to _instantiate_control_projections that is called in _complete_init_of_partially_initialized_nodes Note: still need to set self.needs_update_controller to False after instantiating state_input_ports and projections to them
…rincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports
- _update_state_input_ports_for_controller: handle nested input nodes
_update_state_input_ports_for_controller: fixed bug with > 1 INPUT node in Composition
…rincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports
…rincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports
…ub.com/PrincetonUniversity/PsyNeuLink into feat/ocm/state_features_parallel_lists � Conflicts: � psyneulink/core/components/mechanisms/modulatory/control/optimizationcontrolmechanism.py
…osition IS FULLY CONSTRUCTED) • composition.py: - run(): - set context.execution_phase to ContextFlags.PREPARING at start and reinstate entry context just before executing trials - _complete_init_of_partially_initialized_nodes(): - set needs_update_controller based on return value of ocm._update_state_input_ports_for_controller() • optmizationcontrolmechanism.py: _ _update_state_input_ports_for_controller(): - restrict call to _validate_state_features() to run time (ContextFlags.PROCESSING) - return True if passes, None otherwise - _validate_state_features(): - reinstate warning for number of state_features > agent_rep INPUT Nodes • test_control.py: -test_args_specific_to_ocm() - add run() to test to preciptitate error detected in _validate_state_feature_specs() - test_ocm_state_feature_specs_and_warnings_and_errors(): - reinstate 'too_many_inputs_warning' condition
deal with deferred INPUT nodes in state_features
- add _validate_input_nodes() - add _instantiate_pending_state_features() - STUB at present
- state_features: updated after adding nodes to comp
• optimizationcontrolmechanism.py - state_features: correct to properly include updated INPUT nodes
…ommit) • optimizationcontrolmechanism.py - _parse_state_feature_specs() & state_features: further fixes to properly include added INPUT nodes
…Link into feat/ocm/state_features
_parse_state_feature_specs() & _validate_state_features(): add mention of missing nodes to warning / error messages
add _get_nodes_not_in_agent_rep()
- _parse_state_feature_specs(): enforce list spec for agent_rep_type == COMPOSITION_FUNCTION_APPROXIMATOR
This pull request introduces 2 alerts and fixes 2 when merging 88f05fc into b207320 - view on LGTM.com new alerts:
fixed alerts:
|
This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):
See CI logs for the full diff. |
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.
Main changes:
TBD: document set format for state_features
• composition.py:
and reinstate entry context just before executing trials
• optimizationcontrolmechanism.py:
and state_input_port source specs (state_feature_specs) as parallel lists
• inputport.py:
• test_control.py: