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

Feat/ocm/state and state dict #2281

Merged
merged 32 commits into from
Jan 10, 2022
Merged

Feat/ocm/state and state dict #2281

merged 32 commits into from
Jan 10, 2022

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Jan 8, 2022

• optimizationcontrolmechanism.py

  • add state and state_dict properties
  • _parse_state_feature_specs():
    fix bug in which state_feature using output_port did not get assigned a Projection
    -_update_state_input_ports_for_controller:
    validate state_features that specify an output_port (vs. shadow)

• controlmechanism.py:

  • activate_projections_for_composition(): 
    • fix bug in which state_features that receive from the outputport of a node in the same composition
      were not being activated

• composition.py:

  • add _get_source()
  • add _get_destination()

• compositioninterfacemechanism.py:

  • add _get_modulated_info_from_parameter_CIM()
  • _get_source_node_for_output_CIM -> _get_source_info_from_output_CIM
  • _get_destination_node_for_input_CIM -> _get_destination_info_from_input_CIM

• test_control.py:

  • add test_ocm_state_and_state_dict
  • add test_ocm_state_input_ports_warnings_and_errors

jdcpni and others added 19 commits November 15, 2021 14:44
…Link into devel

� Conflicts:
�	psyneulink/core/components/mechanisms/modulatory/control/optimizationcontrolmechanism.py
  - _assign_incoming_edges():  allow input_CIM of outermost comp to render as node
  - _assign_incoming_edges():  allow input_CIM of outermost comp to render as node
  - _assign_controller_components():
    allow direct projections from nested nodes to OCM or ObjectiveMechanism when show_cim=False
  add test_projections_from_nested_comp_to_ocm_or_obj_mech
  - add state and state_dict properties

• composition.py:
  - add _get_source()
  - add _get_destination()

• compositioninterfacemechanism.py:
  - add _get_modulated_info_from_parameter_CIM()
  - _get_source_node_for_output_CIM -> _get_source_info_from_output_CIM
  - _get_destination_node_for_input_CIM -> _get_destination_info_from_input_CIM
…Link into feat/ocm/state_and_state_dict

� Conflicts:
�	psyneulink/core/components/mechanisms/processing/compositioninterfacemechanism.py
�	psyneulink/core/compositions/showgraph.py
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 8, 2022

This pull request introduces 1 alert when merging 9f0c78b into 21e685c - view on LGTM.com

new alerts:

  • 1 for Unused import

@coveralls
Copy link

coveralls commented Jan 8, 2022

Coverage Status

Coverage increased (+0.02%) to 84.502% when pulling 5c44817 on feat/ocm/state_and_state_dict into 21e685c on devel.

  - state_dict: fix bug in which comp for state_feature using output_port was incorrect
  - _parse_state_feature_specs():
     fix bug in which state_feature using output_port did not get assigned a Projection

•
@github-actions
Copy link

github-actions bot commented Jan 9, 2022

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
281c281
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.library.components.projections.pathway.autoassociativeprojection.</span></span><span class="sig-name descname"><span class="pre">AutoAssociativeProjection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sender</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">receiver</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">matrix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.library.components.projections.pathway.autoassociativeprojection.</span></span><span class="sig-name descname"><span class="pre">AutoAssociativeProjection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">owner=None</span></em>, <em class="sig-param"><span class="pre">sender=None</span></em>, <em class="sig-param"><span class="pre">receiver=None</span></em>, <em class="sig-param"><span class="pre">matrix=None</span></em>, <em class="sig-param"><span class="pre">function=None</span></em>, <em class="sig-param"><span class="pre">params=None</span></em>, <em class="sig-param"><span class="pre">name=None</span></em>, <em class="sig-param"><span class="pre">prefs:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f5d0b4fd890&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em>, <em class="sig-param"><span class="pre">**kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection" title="Permalink to this definition">¶</a></dt>
diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1096c1096
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.combinationfunctions.</span></span><span class="sig-name descname"><span class="pre">PredictionErrorDeltaFunction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gamma</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.combinationfunctions.PredictionErrorDeltaFunction" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.combinationfunctions.</span></span><span class="sig-name descname"><span class="pre">PredictionErrorDeltaFunction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">default_variable=None</span></em>, <em class="sig-param"><span class="pre">gamma:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f5d0deec210&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em>, <em class="sig-param"><span class="pre">params=None</span></em>, <em class="sig-param"><span class="pre">owner=None</span></em>, <em class="sig-param"><span class="pre">prefs:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f5d0deec2d0&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.combinationfunctions.PredictionErrorDeltaFunction" title="Permalink to this definition">¶</a></dt>
diff -r docs-base/Composition.html docs-head/Composition.html
3688a3689,3700
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_source">
> <span class="sig-name descname"><span class="pre">_get_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_source" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of sender for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_destination">
> <span class="sig-name descname"><span class="pre">_get_destination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_destination" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of receiver for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
4506c4518
< <li><p><strong>context</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">optional</span></code>]) – context will be set to self.default_execution_id if unspecified</p></li>
---
> <li><p><strong>context</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">optional</span></code>], default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – context will be set to self.default_execution_id if unspecified</p></li>
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
391,395c391,394
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM">
< <span class="sig-name descname"><span class="pre">_get_destination_node_for_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition for destination of projection from input_CIM to (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM">
> <span class="sig-name descname"><span class="pre">_get_destination_info_from_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “ultimate” destination of projection to <strong>port</strong>.
> <strong>port</strong>: InputPort or OutputPort of the input_CIM to which the projection of interest projects;</p>
397c396
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in output_CIM’s port_map.</p>
398a398,401
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the input_CIM to which <strong>port</strong> belongs by default</p>
> </dd>
> </dl>
402,406c405,408
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM">
< <span class="sig-name descname"><span class="pre">_get_source_node_for_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition  for source of projection to output_CIM from (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM">
> <span class="sig-name descname"><span class="pre">_get_modulated_info_from_parameter_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for parameter modulated by ControlSignal that projects to parameter_CIM.
> <strong>port</strong>: InputPort or OutputPort of the parameter_CIM to which the ControlSignal projects;</p>
408c410
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in parameter_CIM’s port_map.</p>
409a412,429
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the parameter_CIM to which <strong>port</strong> belongs by default.</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM">
> <span class="sig-name descname"><span class="pre">_get_source_info_from_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “original” source of projection from <strong>port</strong>.
> <strong>port</strong> InputPort or OutputPort of the output_CIM from which the projection of interest projects;</p>
> <blockquote>
> <div><p>used to find source (key) in output_CIM’s port_map.</p>
> </div></blockquote>
> <dl class="simple">
> <dt><strong>comp</strong> Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the current CompositionInterfaceMechanism’s Composition by default.</p>
> </dd>
> </dl>
diff -r docs-base/Context.html docs-head/Context.html
523c523
< <em class="property"><span class="pre">classmethod</span> </em><span class="sig-name descname"><span class="pre">_get_context_string</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">condition_flags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fields</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{'execution_phase',</span> <span class="pre">'source'}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 9, 2022

This pull request introduces 1 alert when merging db97888 into 21e685c - view on LGTM.com

new alerts:

  • 1 for Unused import

jdcpni added 2 commits January 9, 2022 09:20
  -_update_state_input_ports_for_controller:
     validate state_features that specify an output_port (vs. shadow)
@github-actions
Copy link

github-actions bot commented Jan 9, 2022

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
281c281
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.library.components.projections.pathway.autoassociativeprojection.</span></span><span class="sig-name descname"><span class="pre">AutoAssociativeProjection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sender</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">receiver</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">matrix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.library.components.projections.pathway.autoassociativeprojection.</span></span><span class="sig-name descname"><span class="pre">AutoAssociativeProjection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">owner=None</span></em>, <em class="sig-param"><span class="pre">sender=None</span></em>, <em class="sig-param"><span class="pre">receiver=None</span></em>, <em class="sig-param"><span class="pre">matrix=None</span></em>, <em class="sig-param"><span class="pre">function=None</span></em>, <em class="sig-param"><span class="pre">params=None</span></em>, <em class="sig-param"><span class="pre">name=None</span></em>, <em class="sig-param"><span class="pre">prefs:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f5bb671d8d0&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em>, <em class="sig-param"><span class="pre">**kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection" title="Permalink to this definition">¶</a></dt>
diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1096c1096
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.combinationfunctions.</span></span><span class="sig-name descname"><span class="pre">PredictionErrorDeltaFunction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gamma</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.combinationfunctions.PredictionErrorDeltaFunction" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.combinationfunctions.</span></span><span class="sig-name descname"><span class="pre">PredictionErrorDeltaFunction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">default_variable=None</span></em>, <em class="sig-param"><span class="pre">gamma:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f5bb910d210&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em>, <em class="sig-param"><span class="pre">params=None</span></em>, <em class="sig-param"><span class="pre">owner=None</span></em>, <em class="sig-param"><span class="pre">prefs:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7f5bb910d290&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.combinationfunctions.PredictionErrorDeltaFunction" title="Permalink to this definition">¶</a></dt>
diff -r docs-base/Composition.html docs-head/Composition.html
3688a3689,3700
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_source">
> <span class="sig-name descname"><span class="pre">_get_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_source" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of sender for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_destination">
> <span class="sig-name descname"><span class="pre">_get_destination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_destination" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of receiver for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
4506c4518
< <li><p><strong>context</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">optional</span></code>]) – context will be set to self.default_execution_id if unspecified</p></li>
---
> <li><p><strong>context</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">optional</span></code>], default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – context will be set to self.default_execution_id if unspecified</p></li>
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
391,395c391,394
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM">
< <span class="sig-name descname"><span class="pre">_get_destination_node_for_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition for destination of projection from input_CIM to (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM">
> <span class="sig-name descname"><span class="pre">_get_destination_info_from_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “ultimate” destination of projection to <strong>port</strong>.
> <strong>port</strong>: InputPort or OutputPort of the input_CIM to which the projection of interest projects;</p>
397c396
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in output_CIM’s port_map.</p>
398a398,401
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the input_CIM to which <strong>port</strong> belongs by default</p>
> </dd>
> </dl>
402,406c405,408
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM">
< <span class="sig-name descname"><span class="pre">_get_source_node_for_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition  for source of projection to output_CIM from (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM">
> <span class="sig-name descname"><span class="pre">_get_modulated_info_from_parameter_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for parameter modulated by ControlSignal that projects to parameter_CIM.
> <strong>port</strong>: InputPort or OutputPort of the parameter_CIM to which the ControlSignal projects;</p>
408c410
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in parameter_CIM’s port_map.</p>
409a412,429
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the parameter_CIM to which <strong>port</strong> belongs by default.</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM">
> <span class="sig-name descname"><span class="pre">_get_source_info_from_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “original” source of projection from <strong>port</strong>.
> <strong>port</strong> InputPort or OutputPort of the output_CIM from which the projection of interest projects;</p>
> <blockquote>
> <div><p>used to find source (key) in output_CIM’s port_map.</p>
> </div></blockquote>
> <dl class="simple">
> <dt><strong>comp</strong> Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the current CompositionInterfaceMechanism’s Composition by default.</p>
> </dd>
> </dl>
diff -r docs-base/Context.html docs-head/Context.html
523c523
< <em class="property"><span class="pre">classmethod</span> </em><span class="sig-name descname"><span class="pre">_get_context_string</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">condition_flags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fields</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{'execution_phase',</span> <span class="pre">'source'}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><
...

See CI logs for the full diff.

@github-actions
Copy link

github-actions bot commented Jan 9, 2022

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
281c281
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.library.components.projections.pathway.autoassociativeprojection.</span></span><span class="sig-name descname"><span class="pre">AutoAssociativeProjection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sender</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">receiver</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">matrix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.library.components.projections.pathway.autoassociativeprojection.</span></span><span class="sig-name descname"><span class="pre">AutoAssociativeProjection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">owner=None</span></em>, <em class="sig-param"><span class="pre">sender=None</span></em>, <em class="sig-param"><span class="pre">receiver=None</span></em>, <em class="sig-param"><span class="pre">matrix=None</span></em>, <em class="sig-param"><span class="pre">function=None</span></em>, <em class="sig-param"><span class="pre">params=None</span></em>, <em class="sig-param"><span class="pre">name=None</span></em>, <em class="sig-param"><span class="pre">prefs:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7fcea5477850&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em>, <em class="sig-param"><span class="pre">**kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection" title="Permalink to this definition">¶</a></dt>
diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1096c1096
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.combinationfunctions.</span></span><span class="sig-name descname"><span class="pre">PredictionErrorDeltaFunction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gamma</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.combinationfunctions.PredictionErrorDeltaFunction" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.combinationfunctions.</span></span><span class="sig-name descname"><span class="pre">PredictionErrorDeltaFunction</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="pre">default_variable=None</span></em>, <em class="sig-param"><span class="pre">gamma:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7fcea7e5ef90&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em>, <em class="sig-param"><span class="pre">params=None</span></em>, <em class="sig-param"><span class="pre">owner=None</span></em>, <em class="sig-param"><span class="pre">prefs:</span> <span class="pre">&lt;typecheck.framework.optional</span> <span class="pre">object</span> <span class="pre">at</span> <span class="pre">0x7fcea7e64090&gt;</span> <span class="pre">=</span> <span class="pre">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.combinationfunctions.PredictionErrorDeltaFunction" title="Permalink to this definition">¶</a></dt>
diff -r docs-base/Composition.html docs-head/Composition.html
3688a3689,3700
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_source">
> <span class="sig-name descname"><span class="pre">_get_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_source" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of sender for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_destination">
> <span class="sig-name descname"><span class="pre">_get_destination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_destination" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of receiver for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
4506c4518
< <li><p><strong>context</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">optional</span></code>]) – context will be set to self.default_execution_id if unspecified</p></li>
---
> <li><p><strong>context</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">optional</span></code>], default: <code class="docutils literal notranslate"><span class="pre">None</span></code>) – context will be set to self.default_execution_id if unspecified</p></li>
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
391,395c391,394
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM">
< <span class="sig-name descname"><span class="pre">_get_destination_node_for_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition for destination of projection from input_CIM to (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM">
> <span class="sig-name descname"><span class="pre">_get_destination_info_from_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “ultimate” destination of projection to <strong>port</strong>.
> <strong>port</strong>: InputPort or OutputPort of the input_CIM to which the projection of interest projects;</p>
397c396
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in output_CIM’s port_map.</p>
398a398,401
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the input_CIM to which <strong>port</strong> belongs by default</p>
> </dd>
> </dl>
402,406c405,408
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM">
< <span class="sig-name descname"><span class="pre">_get_source_node_for_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition  for source of projection to output_CIM from (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM">
> <span class="sig-name descname"><span class="pre">_get_modulated_info_from_parameter_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for parameter modulated by ControlSignal that projects to parameter_CIM.
> <strong>port</strong>: InputPort or OutputPort of the parameter_CIM to which the ControlSignal projects;</p>
408c410
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in parameter_CIM’s port_map.</p>
409a412,429
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the parameter_CIM to which <strong>port</strong> belongs by default.</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM">
> <span class="sig-name descname"><span class="pre">_get_source_info_from_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “original” source of projection from <strong>port</strong>.
> <strong>port</strong> InputPort or OutputPort of the output_CIM from which the projection of interest projects;</p>
> <blockquote>
> <div><p>used to find source (key) in output_CIM’s port_map.</p>
> </div></blockquote>
> <dl class="simple">
> <dt><strong>comp</strong> Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the current CompositionInterfaceMechanism’s Composition by default.</p>
> </dd>
> </dl>
diff -r docs-base/Context.html docs-head/Context.html
523c523
< <em class="property"><span class="pre">classmethod</span> </em><span class="sig-name descname"><span class="pre">_get_context_string</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">condition_flags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fields</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{'execution_phase',</span> <span class="pre">'source'}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 9, 2022

This pull request introduces 1 alert when merging 32bd059 into 21e685c - view on LGTM.com

new alerts:

  • 1 for Unused import

  add test_ocm_state_input_ports_warnings_and_errors
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 9, 2022

This pull request introduces 1 alert when merging 4810379 into 21e685c - view on LGTM.com

new alerts:

  • 1 for Unused import

  restore autodoc_typehints = 'none'
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 9, 2022

This pull request introduces 1 alert when merging 3b6bfb9 into 21e685c - view on LGTM.com

new alerts:

  • 1 for Unused import

jdcpni and others added 5 commits January 9, 2022 19:16
  _update_state_input_ports_for_controller:
      - add check of against format of inputs required by agent_rep.run
  - add_controller():  fix bug in which state_features that receive from the outputport of a node in the same composition were not being activated
@github-actions
Copy link

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

diff -r docs-base/Composition.html docs-head/Composition.html
3688a3689,3700
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_source">
> <span class="sig-name descname"><span class="pre">_get_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_source" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of sender for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_destination">
> <span class="sig-name descname"><span class="pre">_get_destination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_destination" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of receiver for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
391,395c391,394
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM">
< <span class="sig-name descname"><span class="pre">_get_destination_node_for_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition for destination of projection from input_CIM to (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM">
> <span class="sig-name descname"><span class="pre">_get_destination_info_from_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “ultimate” destination of projection to <strong>port</strong>.
> <strong>port</strong>: InputPort or OutputPort of the input_CIM to which the projection of interest projects;</p>
397c396
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in output_CIM’s port_map.</p>
398a398,401
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the input_CIM to which <strong>port</strong> belongs by default</p>
> </dd>
> </dl>
402,406c405,408
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM">
< <span class="sig-name descname"><span class="pre">_get_source_node_for_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition  for source of projection to output_CIM from (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM">
> <span class="sig-name descname"><span class="pre">_get_modulated_info_from_parameter_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for parameter modulated by ControlSignal that projects to parameter_CIM.
> <strong>port</strong>: InputPort or OutputPort of the parameter_CIM to which the ControlSignal projects;</p>
408c410
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in parameter_CIM’s port_map.</p>
409a412,429
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the parameter_CIM to which <strong>port</strong> belongs by default.</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM">
> <span class="sig-name descname"><span class="pre">_get_source_info_from_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “original” source of projection from <strong>port</strong>.
> <strong>port</strong> InputPort or OutputPort of the output_CIM from which the projection of interest projects;</p>
> <blockquote>
> <div><p>used to find source (key) in output_CIM’s port_map.</p>
> </div></blockquote>
> <dl class="simple">
> <dt><strong>comp</strong> Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the current CompositionInterfaceMechanism’s Composition by default.</p>
> </dd>
> </dl>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
454,458c454,458
< <p>The <strong>state_features</strong> specified when the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a
< <a class="reference internal" href="CompositionFunctionApproximator.html"><span class="doc">CompositionFunctionApproximator</span></a> must align with the arguments of its <a class="reference internal" href="CompositionFunctionApproximator.html#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">evaluate</span></code></a> method.  Since the latter cannot always be determined automatically,
< the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_input_ports</span></code></a> cannot be created automatically, nor
< can the <strong>state_features</strong> specification be validated;  thus, specifying inappropriate <strong>state_features</strong> may
< produce errors that are unexpected or difficult to interpret.</p>
---
> <p>The <strong>state_features</strong> specified when the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a>
> is a <a class="reference internal" href="CompositionFunctionApproximator.html"><span class="doc">CompositionFunctionApproximator</span></a> must align with the arguments of its <a class="reference internal" href="CompositionFunctionApproximator.html#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">evaluate</span></code></a> method.  Since the latter cannot always be determined
> automatically, the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_input_ports</span></code></a> cannot be created
> automatically, nor can the <strong>state_features</strong> specification be validated;  thus, specifying inappropriate
> <strong>state_features</strong> may produce errors that are unexpected or difficult to interpret.</p>
488a489,490
> </ul>
> <ul class="simple">
493,497c495,513
< <li><p><em>Mechanism</em> – if the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a Composition, it must be an
< <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of that Composition, and the Mechanism’s <a class="reference internal" href="InputPort.html#inputport-primary"><span class="std std-ref">primary InputPort</span></a> is used (since in this case the state_feature must correspond to an input to the Composition).
< If the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a <a class="reference internal" href="CompositionFunctionApproximator.html"><span class="doc">CompositionFunctionApproximator</span></a>, then the
< Mechanism’s <a class="reference internal" href="OutputPort.html#outputport-primary"><span class="std std-ref">primary OutputPort</span></a> is used (since is the typical usage for specifying an
< InputPort);  if the input to the Mechanism is to be shadowed, then its InputPort must be specified explicitly.</p></li>
---
> </ul>
> <ul class="simple">
> <li><p><em>Mechanism</em> – if the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a Composition, the Mechanism must
> be an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of that Composition, and the Mechanism’s <a class="reference internal" href="InputPort.html#inputport-primary"><span class="std std-ref">primary
> InputPort</span></a> is <a class="reference internal" href="#optimization-control-mechanism-input-port-state-feature"><span class="std std-ref">shadowed</span></a> (since in
> this case the state_feature must correspond to an input to the Composition). If the Mechanism is not an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> Node, an error is generated; if its OutputPort is to be used, that needs to be specified
> explicitly (as described <a class="reference internal" href="#optimization-control-mechanism-output-port-state-feature"><span class="std std-ref">above</span></a>).  In contrast, if the
> <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils lite
...

See CI logs for the full diff.

jdcpni added 2 commits January 9, 2022 23:44
  _update_state_input_ports_for_controller:  modified warning message for use of state_features
@github-actions
Copy link

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

diff -r docs-base/Composition.html docs-head/Composition.html
3688a3689,3700
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_source">
> <span class="sig-name descname"><span class="pre">_get_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_source" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of sender for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_destination">
> <span class="sig-name descname"><span class="pre">_get_destination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">projection</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._get_destination" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return tuple with port, node and comp of receiver for <strong>projection</strong> (possibly in a nested Composition).</p>
> </dd></dl>
> 
> <dl class="py method">
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
391,395c391,394
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM">
< <span class="sig-name descname"><span class="pre">_get_destination_node_for_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_node_for_input_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition for destination of projection from input_CIM to (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM">
> <span class="sig-name descname"><span class="pre">_get_destination_info_from_input_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_destination_info_from_input_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “ultimate” destination of projection to <strong>port</strong>.
> <strong>port</strong>: InputPort or OutputPort of the input_CIM to which the projection of interest projects;</p>
397c396
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in output_CIM’s port_map.</p>
398a398,401
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the input_CIM to which <strong>port</strong> belongs by default</p>
> </dd>
> </dl>
402,406c405,408
< <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM">
< <span class="sig-name descname"><span class="pre">_get_source_node_for_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_node_for_output_CIM" title="Permalink to this definition">¶</a></dt>
< <dd><p>Return Port, Node and Composition  for source of projection to output_CIM from (possibly nested) node
< <strong>port</strong> should be an InputPort or OutputPort of the CompositionInterfaceMechanism;
< <strong>comp</strong> specifies the Composition at which to begin the search (or continue it when called recursively;</p>
---
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM">
> <span class="sig-name descname"><span class="pre">_get_modulated_info_from_parameter_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_modulated_info_from_parameter_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for parameter modulated by ControlSignal that projects to parameter_CIM.
> <strong>port</strong>: InputPort or OutputPort of the parameter_CIM to which the ControlSignal projects;</p>
408c410
< <div><p>assumes the current CompositionInterfaceMechanism’s Composition by default</p>
---
> <div><p>used to find destination (key) in parameter_CIM’s port_map.</p>
409a412,429
> <dl class="simple">
> <dt><strong>comp</strong>: Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the Composition for the parameter_CIM to which <strong>port</strong> belongs by default.</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py method">
> <dt class="sig sig-object py" id="psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM">
> <span class="sig-name descname"><span class="pre">_get_source_info_from_output_CIM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">port</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism.CompositionInterfaceMechanism._get_source_info_from_output_CIM" title="Permalink to this definition">¶</a></dt>
> <dd><p>Return Port, Node and Composition for “original” source of projection from <strong>port</strong>.
> <strong>port</strong> InputPort or OutputPort of the output_CIM from which the projection of interest projects;</p>
> <blockquote>
> <div><p>used to find source (key) in output_CIM’s port_map.</p>
> </div></blockquote>
> <dl class="simple">
> <dt><strong>comp</strong> Composition at which to begin the search (or continue it when called recursively);</dt><dd><p>assumes the current CompositionInterfaceMechanism’s Composition by default.</p>
> </dd>
> </dl>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
454,458c454,458
< <p>The <strong>state_features</strong> specified when the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a
< <a class="reference internal" href="CompositionFunctionApproximator.html"><span class="doc">CompositionFunctionApproximator</span></a> must align with the arguments of its <a class="reference internal" href="CompositionFunctionApproximator.html#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">evaluate</span></code></a> method.  Since the latter cannot always be determined automatically,
< the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_input_ports</span></code></a> cannot be created automatically, nor
< can the <strong>state_features</strong> specification be validated;  thus, specifying inappropriate <strong>state_features</strong> may
< produce errors that are unexpected or difficult to interpret.</p>
---
> <p>The <strong>state_features</strong> specified when the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a>
> is a <a class="reference internal" href="CompositionFunctionApproximator.html"><span class="doc">CompositionFunctionApproximator</span></a> must align with the arguments of its <a class="reference internal" href="CompositionFunctionApproximator.html#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.evaluate"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">evaluate</span></code></a> method.  Since the latter cannot always be determined
> automatically, the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_input_ports</span></code></a> cannot be created
> automatically, nor can the <strong>state_features</strong> specification be validated;  thus, specifying inappropriate
> <strong>state_features</strong> may produce errors that are unexpected or difficult to interpret.</p>
488a489,490
> </ul>
> <ul class="simple">
493,497c495,513
< <li><p><em>Mechanism</em> – if the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a Composition, it must be an
< <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of that Composition, and the Mechanism’s <a class="reference internal" href="InputPort.html#inputport-primary"><span class="std std-ref">primary InputPort</span></a> is used (since in this case the state_feature must correspond to an input to the Composition).
< If the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a <a class="reference internal" href="CompositionFunctionApproximator.html"><span class="doc">CompositionFunctionApproximator</span></a>, then the
< Mechanism’s <a class="reference internal" href="OutputPort.html#outputport-primary"><span class="std std-ref">primary OutputPort</span></a> is used (since is the typical usage for specifying an
< InputPort);  if the input to the Mechanism is to be shadowed, then its InputPort must be specified explicitly.</p></li>
---
> </ul>
> <ul class="simple">
> <li><p><em>Mechanism</em> – if the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">agent_rep</span></code></a> is a Composition, the Mechanism must
> be an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of that Composition, and the Mechanism’s <a class="reference internal" href="InputPort.html#inputport-primary"><span class="std std-ref">primary
> InputPort</span></a> is <a class="reference internal" href="#optimization-control-mechanism-input-port-state-feature"><span class="std std-ref">shadowed</span></a> (since in
> this case the state_feature must correspond to an input to the Composition). If the Mechanism is not an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> Node, an error is generated; if its OutputPort is to be used, that needs to be specified
> explicitly (as described <a class="reference internal" href="#optimization-control-mechanism-output-port-state-feature"><span class="std std-ref">above</span></a>).  In contrast, if the
> <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.agent_rep"><code class="xref any py py-attr docutils lite
...

See CI logs for the full diff.

@jdcpni jdcpni merged commit 6765320 into devel Jan 10, 2022
@jdcpni jdcpni deleted the feat/ocm/state_and_state_dict branch January 10, 2022 12:39
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.

2 participants