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

Refactor/ocm/state features all as input ports #2356

Merged
merged 390 commits into from
Mar 23, 2022

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Mar 23, 2022

• optimzationcontrolmechanism.py:  fix figure

jdcpni and others added 30 commits November 29, 2021 20:32
  - add_projection:  delete instantiation of shadow projections (handled by _update_shadow_projections)
  - add_projection:  delete instantiation of shadow projections (handled by _update_shadow_projections)
  - remove calls to _update_shadows_dict
  - add_projection:  delete instantiation of shadow projections (handled by _update_shadow_projections)
  - remove calls to _update_shadows_dict
  - added property shadowing_dict that has shadowing ports as keys and the ports they shadow as values
  - refactored _update_shadowing_projections to use shadowing_dict
  - _update_state_input_ports:  modified validations for nested nodes;  still failing some tests
  - _update_state_input_ports:
     more careful and informative validation that state_input_ports are in comp or nested comp and are INPUT nodes thereof;
     passes all tests except test_two_origins_two_input_ports as before
  _get_invalid_aux_components():  defer all shadow projections until _update_shadow_projections
  _get_invalid_aux_components():  bug fix in test for shadow projections
even ports with no incoming projections have variable at least length 1
  add_node(): marked (but haven't removed) code block instantiating shadow_projections
   that seems now to be redundant with _update_shadow_projection
  - _assign_cim_components: supress showing projections not in composition
  _analyze_graph():  add extra call to _determine_node_roles after _update_shadow_projections
  _run():  moved block of code at beginning initializing scheduler to after
           _complete_init_of_partially_initialized_nodes and _analyze_graph()

• show_graph.py
  - add test to all loops on projections:  "if proj in composition.projection"
  - add show_projections_not_in_composition option for debugging
  _update_shadow_projections(): delete unused shadow projections and corresponding ports
  _update_shadow_projections(): fix bug in deletion of unused shadow projections and ports

• test_show_graph:  tests failing, need mods to accomodate changes
  _analyze_graph():  add extra call to _determine_node_roles after _update_shadow_projections
  _run():  moved block of code at beginning initializing scheduler to after
           _complete_init_of_partially_initialized_nodes and _analyze_graph()

• show_graph.py
  - add test to all loops on projections:  "if proj in composition.projection"
  fixes; now passes all show_graph tests
  _update_shadow_projections:  raise error for attempt to shadow INTERNAL Node of nested comp
  implemented test_shadow_nested_nodes that tests shadowing of nested nodes
…ttps://github.com/PrincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports_PROBE_STATE_FEAT_FCT

� Conflicts:
�	tests/composition/test_show_graph.py
…Link into refactor/ocm/state_input_ports_PROBE_STATE_FEAT_FCT

� Conflicts:
�	tests/composition/test_show_graph.py
  - _specified_INPUT_Node_InputPorts_in_order:  use name (str) of items not yet in agent_rep rather than 'None'
  - state_features & state_feature_values:
    - use name (str) as key if INPUT Node InputPort is not yet in agent_rep
    - use name (str) if source (spec) is not yet in Composition
  - state_features:
    - convert all keys and values to port.full_name
    - if not yet in comp or agent_rep, add "DEFERRED..."
  PASSES deferred_init and partial_deferred_init tests
  - state_feature_values: strings for missing keys or values
  add _is_in_composition method
…Link into refactor/ocm/state_features_all_as_input_ports
…nto refactor/ocm/state_features_all_as_input_ports
…Link into refactor/ocm/state_features_all_as_input_ports
@github-actions
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
353c353
< <a class="reference internal image-reference" href="_static/Optimization_fig.svg"><img alt="OptimizationControlMechanism" src="_static/Optimization_fig.svg" /></a>
---
> <a class="reference internal image-reference" href="_images/Optimization_fig.svg"><img alt="OptimizationControlMechanism" src="_images/Optimization_fig.svg" /></a>
Only in docs-head/_images: Optimization_fig.svg
Only in docs-head/_static: Optimization_fig.svg
Only in docs-base/_static: Optimization_fig_BAK.svg

...

See CI logs for the full diff.

1 similar comment
@github-actions
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
353c353
< <a class="reference internal image-reference" href="_static/Optimization_fig.svg"><img alt="OptimizationControlMechanism" src="_static/Optimization_fig.svg" /></a>
---
> <a class="reference internal image-reference" href="_images/Optimization_fig.svg"><img alt="OptimizationControlMechanism" src="_images/Optimization_fig.svg" /></a>
Only in docs-head/_images: Optimization_fig.svg
Only in docs-head/_static: Optimization_fig.svg
Only in docs-base/_static: Optimization_fig_BAK.svg

...

See CI logs for the full diff.

@coveralls
Copy link

coveralls commented Mar 23, 2022

Coverage Status

Coverage decreased (-0.01%) to 84.118% when pulling b1a4948 on refactor/ocm/state_features_all_as_input_ports into 7a406ca on devel.

@jdcpni jdcpni merged commit f8130b4 into devel Mar 23, 2022
@jdcpni jdcpni deleted the refactor/ocm/state_features_all_as_input_ports branch March 23, 2022 19:55
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.

None yet

3 participants