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 feat dict #2291

Merged
merged 326 commits into from
Jan 15, 2022
Merged

Feat/ocm/state feat dict #2291

merged 326 commits into from
Jan 15, 2022

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Jan 15, 2022

• composition.py:

  • add_node():
    • if NodeRole.INTERNAL specified, assign internal_only to all InputPorts
  • _determine_node_roles():
    • if if NodeRole.INTERNAL specified, preclude NodeRole.INPUT
  • NodeRole:
    • edit docstring for INTERNAL
  • _build_predicted_input_dicts():
    • add controller as argument
    • support regular (non-shadowed) inputs (i.e., from output_ports of other nodes)
    • support use of keys for inputs dict from dict specified for state_features of OCM
  • evaluate():
    • controller = self._get_controller()
    • self.controller -> controller
  • _check_for_projection_assignments():
    • suppress warning for no afferent projections to an InputPort if default_input is set (see below)
  • _validate_input_dict_node_roles -> _instantiate_input_dict
  • _parse_dict -> _parse_input_dict

• inputport.py:

  • add default_input Parameter
  • _update():
    • if no afferent projections and default_input=DEFAULT_VARIABLE, use default_variable, else return None
  • docstring edits

• port.py:

  • _execute(): use default_input for InputPorts if specified

• optimizationcontrolmechanism.py:

  • _update_state_input_ports_for_controller():
    • add check of against format of inputs required by agent_rep.run
  • _build_predicted_inputs_dict():
    • support dict specification of state_features
    • if list, assign specs to INPUT Nodes of agent_rep in order of listing in agent_rep.nodes
  • _parse_state_feature_specs():
    set InputPort.default_input=DEFAULT_VARIABLE if state_feature specification is numerical

• test_control.py:

  • test_ocm_warnings_and_errors -> test_ocm_state_feature_specs_and_warnings_and_errors()
  • test_ocm_state_feature_specs_and_warnings_and_errors():
    • add tests for dict spec of ocm state_features
    • add test for numerical specification of state_feature
    • update messages
  • test_nested_composition_as_agent_rep():
    • reinstate and update
  • test_ocm_state_and_state_dict():
    • add test for numerical assignment to state_feature
    • update messages

• test_input_ports.py

  • add test_default_input():
    • test use of InputPort.default_input

jdcpni and others added 30 commits November 17, 2021 17:07
  - _update_state_input_ports_for_controller: handle nested input nodes
  _update_state_input_ports_for_controller:  fixed bug with > 1 INPUT node in Composition
  - _instantiate_monitor_for_control_input_ports -> _parse_monitor_control_input_ports
  - refactored to support allow_probes option on ocm
  - _instantiate_monitor_for_control_input_ports -> _parse_monitor_control_input_ports
  - refactored to support allow_probes option on ocm
  - _instantiate_monitor_for_control_input_ports -> _parse_monitor_control_input_ports
  - refactored to support allow_probes option on ocm
  __init__: move controller to after add_nodes and add_linear_pathway
jdcpni and others added 13 commits January 14, 2022 11:35
…Link into feat/ocm/state_feat_dict

� Conflicts:
�	psyneulink/core/compositions/composition.py
  - _parse_state_feature_specs():
      set InputPort.default_input=DEFAULT_VARIABLE if state_feature specification is numerical
  - _parse_state_feature_specs():
      set InputPort.default_input=DEFAULT_VARIABLE if state_feature specification is numerical
  _parse_state_feature_spec: fix bug with attempt to get nodes of CFA
  - _update_state_input_ports_for_controller: error message edits

• test_control.py:
  - test_ocm_state_feature_specs_and_warnings_and_errors: add test for numerical assignment of state_feature
 - test_ocm_state_and_state_dict: numerical assignment to state_feature
 - test_default_input: passes (but has comments with some desired refactoring
@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
4030a4031,4039
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_controller">
> <span class="sig-name descname"><span class="pre">_get_controller</span></span><span class="sig-paren">(</span><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>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._get_controller" title="Permalink to this definition">¶</a></dt>
> <dd><p>Get controller for which the current Composition is an agent_rep.
> Recursively search enclosing Compositions for controller if self does not have one.
> Use context.composition if there is no controller.
> This is needed for agent_rep that is nested within the Composition to which the controller belongs.</p>
> </dd></dl>
> 
> <dl class="py method">
4053c4062
< <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_input</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">controller</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.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
4267,4268c4276,4277
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_dict">
< <span class="sig-name descname"><span class="pre">_parse_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_dict" title="Permalink to this definition">¶</a></dt>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_input_dict">
> <span class="sig-name descname"><span class="pre">_parse_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_input_dict" title="Permalink to this definition">¶</a></dt>
4270c4279
< <dt>Validates and parses a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
---
> <dt>Validate and parse a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
4277c4286
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets in dict for each input node in the Composition</p></li>
---
> <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets (i.e., trials’ worths of inputs) in dict for each input node in the Composition</p></li>
4285,4290c4294,4298
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles">
< <span class="sig-name descname"><span class="pre">_validate_input_dict_node_roles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles" title="Permalink to this definition">¶</a></dt>
< <dd><dl class="simple">
< <dt>Validates that all nodes included in input dict are input nodes. Additionally, if any input nodes are not</dt><dd><p>included, adds them to the input dict using their default values as entries</p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._instantiate_input_dict">
> <span class="sig-name descname"><span class="pre">_instantiate_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._instantiate_input_dict" title="Permalink to this definition">¶</a></dt>
> <dd><p>Implement dict with all INPUT Nodes of Composition as keys and their assigned inputs or defaults as values
> Validate that all Nodes included in input dict are INPUT nodes of Composition.
> If any input nodes of Composition are not included, add them to the input dict using their default values.</p>
4293c4301
< <dd class="field-odd"><p>The input dict, with added entries for any input nodes for which input was not provided</p>
---
> <dd class="field-odd"><p>Input dict, with added entries for any input Nodes for which input was not provided</p>
diff -r docs-base/CompositionFunctionApproximator.html docs-head/CompositionFunctionApproximator.html
240,242c240,242
< <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>
< and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a> provided by the OptimizationControlMechanism.
< Its <a class="reference internal" href="#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 calls its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
---
> <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a> and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>
> provided by the OptimizationControlMechanism. Its <a class="reference internal" href="#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 calls
> its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
232c232
< in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id15" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
---
> in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id14" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
diff -r docs-base/InputPort.html docs-head/InputPort.html
370c370
< InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> or entry, the value
---
> InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> entry, the value
567c567
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">projections</span></code> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.projections" title="psyneulink.core.components.ports.port.Port_Base.projections"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">projections</span></code></a> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
570c570
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">path_afferents</span></code> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.path_afferents" title="psyneulink.core.components.ports.port.Port_Base.path_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">path_afferents</span></code></a> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
574,576c574,576
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">mod_afferents</span></code> – <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjections</span></a> that project to the InputPort,
< the <a class="reference internal" href="GatingProjection.html#psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value" title="psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> of which can modify the InputPort’s <a class="reference internal" href="#psyneulink.core.components.ports.inputport.InputPort.value" title="psyneulink.core.components.ports.inputport.InputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> (see the
< descriptions of Modulation under <a class="reference internal" href="ModulatorySignal.html#modulatorysignal-modulation"><span class="std std-ref">ModulatorySignals</span></a> and <a class="reference internal" href="GatingSignal.html#gatingsignal-modulation"><span class="std std-ref">GatingSignals</span></a> 
...

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/Composition.html docs-head/Composition.html
4030a4031,4039
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_controller">
> <span class="sig-name descname"><span class="pre">_get_controller</span></span><span class="sig-paren">(</span><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>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._get_controller" title="Permalink to this definition">¶</a></dt>
> <dd><p>Get controller for which the current Composition is an agent_rep.
> Recursively search enclosing Compositions for controller if self does not have one.
> Use context.composition if there is no controller.
> This is needed for agent_rep that is nested within the Composition to which the controller belongs.</p>
> </dd></dl>
> 
> <dl class="py method">
4053c4062
< <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_input</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">controller</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.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
4267,4268c4276,4277
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_dict">
< <span class="sig-name descname"><span class="pre">_parse_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_dict" title="Permalink to this definition">¶</a></dt>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_input_dict">
> <span class="sig-name descname"><span class="pre">_parse_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_input_dict" title="Permalink to this definition">¶</a></dt>
4270c4279
< <dt>Validates and parses a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
---
> <dt>Validate and parse a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
4277c4286
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets in dict for each input node in the Composition</p></li>
---
> <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets (i.e., trials’ worths of inputs) in dict for each input node in the Composition</p></li>
4285,4290c4294,4298
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles">
< <span class="sig-name descname"><span class="pre">_validate_input_dict_node_roles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles" title="Permalink to this definition">¶</a></dt>
< <dd><dl class="simple">
< <dt>Validates that all nodes included in input dict are input nodes. Additionally, if any input nodes are not</dt><dd><p>included, adds them to the input dict using their default values as entries</p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._instantiate_input_dict">
> <span class="sig-name descname"><span class="pre">_instantiate_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._instantiate_input_dict" title="Permalink to this definition">¶</a></dt>
> <dd><p>Implement dict with all INPUT Nodes of Composition as keys and their assigned inputs or defaults as values
> Validate that all Nodes included in input dict are INPUT nodes of Composition.
> If any input nodes of Composition are not included, add them to the input dict using their default values.</p>
4293c4301
< <dd class="field-odd"><p>The input dict, with added entries for any input nodes for which input was not provided</p>
---
> <dd class="field-odd"><p>Input dict, with added entries for any input Nodes for which input was not provided</p>
diff -r docs-base/CompositionFunctionApproximator.html docs-head/CompositionFunctionApproximator.html
240,242c240,242
< <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>
< and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a> provided by the OptimizationControlMechanism.
< Its <a class="reference internal" href="#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 calls its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
---
> <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a> and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>
> provided by the OptimizationControlMechanism. Its <a class="reference internal" href="#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 calls
> its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
232c232
< in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id15" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
---
> in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id14" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
diff -r docs-base/InputPort.html docs-head/InputPort.html
370c370
< InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> or entry, the value
---
> InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> entry, the value
567c567
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">projections</span></code> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.projections" title="psyneulink.core.components.ports.port.Port_Base.projections"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">projections</span></code></a> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
570c570
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">path_afferents</span></code> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.path_afferents" title="psyneulink.core.components.ports.port.Port_Base.path_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">path_afferents</span></code></a> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
574,576c574,576
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">mod_afferents</span></code> – <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjections</span></a> that project to the InputPort,
< the <a class="reference internal" href="GatingProjection.html#psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value" title="psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> of which can modify the InputPort’s <a class="reference internal" href="#psyneulink.core.components.ports.inputport.InputPort.value" title="psyneulink.core.components.ports.inputport.InputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> (see the
< descriptions of Modulation under <a class="reference internal" href="ModulatorySignal.html#modulatorysignal-modulation"><span class="std std-ref">ModulatorySignals</span></a> and <a class="reference internal" href="GatingSignal.html#gatingsignal-modulation"><span class="std std-ref">GatingSignals</span></a> 
...

See CI logs for the full diff.

@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
4030a4031,4039
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_controller">
> <span class="sig-name descname"><span class="pre">_get_controller</span></span><span class="sig-paren">(</span><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>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._get_controller" title="Permalink to this definition">¶</a></dt>
> <dd><p>Get controller for which the current Composition is an agent_rep.
> Recursively search enclosing Compositions for controller if self does not have one.
> Use context.composition if there is no controller.
> This is needed for agent_rep that is nested within the Composition to which the controller belongs.</p>
> </dd></dl>
> 
> <dl class="py method">
4053c4062
< <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_input</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">controller</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.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
4267,4268c4276,4277
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_dict">
< <span class="sig-name descname"><span class="pre">_parse_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_dict" title="Permalink to this definition">¶</a></dt>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_input_dict">
> <span class="sig-name descname"><span class="pre">_parse_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_input_dict" title="Permalink to this definition">¶</a></dt>
4270c4279
< <dt>Validates and parses a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
---
> <dt>Validate and parse a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
4277c4286
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets in dict for each input node in the Composition</p></li>
---
> <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets (i.e., trials’ worths of inputs) in dict for each input node in the Composition</p></li>
4285,4290c4294,4298
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles">
< <span class="sig-name descname"><span class="pre">_validate_input_dict_node_roles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles" title="Permalink to this definition">¶</a></dt>
< <dd><dl class="simple">
< <dt>Validates that all nodes included in input dict are input nodes. Additionally, if any input nodes are not</dt><dd><p>included, adds them to the input dict using their default values as entries</p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._instantiate_input_dict">
> <span class="sig-name descname"><span class="pre">_instantiate_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._instantiate_input_dict" title="Permalink to this definition">¶</a></dt>
> <dd><p>Implement dict with all INPUT Nodes of Composition as keys and their assigned inputs or defaults as values
> Validate that all Nodes included in input dict are INPUT nodes of Composition.
> If any input nodes of Composition are not included, add them to the input dict using their default values.</p>
4293c4301
< <dd class="field-odd"><p>The input dict, with added entries for any input nodes for which input was not provided</p>
---
> <dd class="field-odd"><p>Input dict, with added entries for any input Nodes for which input was not provided</p>
diff -r docs-base/CompositionFunctionApproximator.html docs-head/CompositionFunctionApproximator.html
240,242c240,242
< <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>
< and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a> provided by the OptimizationControlMechanism.
< Its <a class="reference internal" href="#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 calls its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
---
> <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a> and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>
> provided by the OptimizationControlMechanism. Its <a class="reference internal" href="#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 calls
> its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
232c232
< in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id15" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
---
> in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id14" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
diff -r docs-base/InputPort.html docs-head/InputPort.html
370c370
< InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> or entry, the value
---
> InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> entry, the value
567c567
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">projections</span></code> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.projections" title="psyneulink.core.components.ports.port.Port_Base.projections"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">projections</span></code></a> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
570c570
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">path_afferents</span></code> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.path_afferents" title="psyneulink.core.components.ports.port.Port_Base.path_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">path_afferents</span></code></a> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
574,576c574,576
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">mod_afferents</span></code> – <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjections</span></a> that project to the InputPort,
< the <a class="reference internal" href="GatingProjection.html#psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value" title="psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> of which can modify the InputPort’s <a class="reference internal" href="#psyneulink.core.components.ports.inputport.InputPort.value" title="psyneulink.core.components.ports.inputport.InputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> (see the
< descriptions of Modulation under <a class="reference internal" href="ModulatorySignal.html#modulatorysignal-modulation"><span class="std std-ref">ModulatorySignals</span></a> and <a class="reference internal" href="GatingSignal.html#gatingsignal-modulation"><span class="std std-ref">GatingSignals</span></a> 
...

See CI logs for the full diff.

  - add_node():  if NodeRole.INTERNAL specified, assign internal_only to all InputPorts
  - _determine_node_roles():  if if NodeRole.INTERNAL specified, preclude NodeRole.INPUT
  - add_node():  if NodeRole.INTERNAL specified, assign internal_only to all InputPorts
  - _determine_node_roles():  if if NodeRole.INTERNAL specified, preclude NodeRole.INPUT
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 15, 2022

This pull request introduces 2 alerts when merging 4ccaa7a into a64bbc5 - view on LGTM.com

new alerts:

  • 1 for Comparison using is when operands support `__eq__`
  • 1 for Unused import

  - add_node():  if NodeRole.INTERNAL specified, assign internal_only to all InputPorts
  - _determine_node_roles():  if if NodeRole.INTERNAL specified, preclude NodeRole.INPUT
@coveralls
Copy link

coveralls commented Jan 15, 2022

Coverage Status

Coverage increased (+0.02%) to 84.532% when pulling 7f950fb on feat/ocm/state_feat_dict into a64bbc5 on devel.

@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
4030a4031,4039
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_controller">
> <span class="sig-name descname"><span class="pre">_get_controller</span></span><span class="sig-paren">(</span><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>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._get_controller" title="Permalink to this definition">¶</a></dt>
> <dd><p>Get controller for which the current Composition is an agent_rep.
> Recursively search enclosing Compositions for controller if self does not have one.
> Use context.composition if there is no controller.
> This is needed for agent_rep that is nested within the Composition to which the controller belongs.</p>
> </dd></dl>
> 
> <dl class="py method">
4053c4062
< <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_input</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">controller</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.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
4267,4268c4276,4277
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_dict">
< <span class="sig-name descname"><span class="pre">_parse_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_dict" title="Permalink to this definition">¶</a></dt>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_input_dict">
> <span class="sig-name descname"><span class="pre">_parse_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_input_dict" title="Permalink to this definition">¶</a></dt>
4270c4279
< <dt>Validates and parses a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
---
> <dt>Validate and parse a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
4277c4286
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets in dict for each input node in the Composition</p></li>
---
> <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets (i.e., trials’ worths of inputs) in dict for each input node in the Composition</p></li>
4285,4290c4294,4298
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles">
< <span class="sig-name descname"><span class="pre">_validate_input_dict_node_roles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles" title="Permalink to this definition">¶</a></dt>
< <dd><dl class="simple">
< <dt>Validates that all nodes included in input dict are input nodes. Additionally, if any input nodes are not</dt><dd><p>included, adds them to the input dict using their default values as entries</p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._instantiate_input_dict">
> <span class="sig-name descname"><span class="pre">_instantiate_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._instantiate_input_dict" title="Permalink to this definition">¶</a></dt>
> <dd><p>Implement dict with all INPUT Nodes of Composition as keys and their assigned inputs or defaults as values
> Validate that all Nodes included in input dict are INPUT nodes of Composition.
> If any input nodes of Composition are not included, add them to the input dict using their default values.</p>
4293c4301
< <dd class="field-odd"><p>The input dict, with added entries for any input nodes for which input was not provided</p>
---
> <dd class="field-odd"><p>Input dict, with added entries for any input Nodes for which input was not provided</p>
diff -r docs-base/CompositionFunctionApproximator.html docs-head/CompositionFunctionApproximator.html
240,242c240,242
< <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>
< and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a> provided by the OptimizationControlMechanism.
< Its <a class="reference internal" href="#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 calls its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
---
> <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a> and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>
> provided by the OptimizationControlMechanism. Its <a class="reference internal" href="#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 calls
> its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
232c232
< in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id15" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
---
> in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id14" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
diff -r docs-base/InputPort.html docs-head/InputPort.html
370c370
< InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> or entry, the value
---
> InputPort in the constructor for a Mechanism, and it includes a <em>VARIABLE</em> and/or <em>VALUE</em> entry, the value
567c567
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">projections</span></code> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.projections" title="psyneulink.core.components.ports.port.Port_Base.projections"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">projections</span></code></a> – all of the <a class="reference internal" href="Projection.html"><span class="doc">Projections</span></a> received by the InputPort.</p></li>
570c570
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">path_afferents</span></code> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
---
> <li><p><a class="reference internal" href="Port.html#psyneulink.core.components.ports.port.Port_Base.path_afferents" title="psyneulink.core.components.ports.port.Port_Base.path_afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">path_afferents</span></code></a> – <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjections</span></a> that project to the InputPort,
574,576c574,576
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">mod_afferents</span></code> – <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjections</span></a> that project to the InputPort,
< the <a class="reference internal" href="GatingProjection.html#psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value" title="psyneulink.core.components.projections.modulatory.gatingprojection.GatingProjection.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> of which can modify the InputPort’s <a class="reference internal" href="#psyneulink.core.components.ports.inputport.InputPort.value" title="psyneulink.core.components.ports.inputport.InputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> (see the
< descriptions of Modulation under <a class="reference internal" href="ModulatorySignal.html#modulatorysignal-modulation"><span class="std std-ref">ModulatorySignals</span></a> and <a class="reference internal" href="GatingSignal.html#gatingsignal-modulation"><span class="std std-ref">GatingSignals</span></a> 
...

See CI logs for the full diff.

@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
4030a4031,4039
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._get_controller">
> <span class="sig-name descname"><span class="pre">_get_controller</span></span><span class="sig-paren">(</span><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>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._get_controller" title="Permalink to this definition">¶</a></dt>
> <dd><p>Get controller for which the current Composition is an agent_rep.
> Recursively search enclosing Compositions for controller if self does not have one.
> Use context.composition if there is no controller.
> This is needed for agent_rep that is nested within the Composition to which the controller belongs.</p>
> </dd></dl>
> 
> <dl class="py method">
4053c4062
< <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_input</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
---
> <span class="sig-name descname"><span class="pre">_build_predicted_inputs_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">predicted_inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">controller</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.compositions.composition.Composition._build_predicted_inputs_dict" title="Permalink to this definition">¶</a></dt>
4267,4268c4276,4277
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_dict">
< <span class="sig-name descname"><span class="pre">_parse_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_dict" title="Permalink to this definition">¶</a></dt>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._parse_input_dict">
> <span class="sig-name descname"><span class="pre">_parse_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context</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.compositions.composition.Composition._parse_input_dict" title="Permalink to this definition">¶</a></dt>
4270c4279
< <dt>Validates and parses a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
---
> <dt>Validate and parse a dict provided as input to a Composition into a standardized form to be used throughout</dt><dd><p>its execution</p>
4277c4286
< <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets in dict for each input node in the Composition</p></li>
---
> <li><p><code class="xref any docutils literal notranslate"><span class="pre">int</span></code> – Number of input sets (i.e., trials’ worths of inputs) in dict for each input node in the Composition</p></li>
4285,4290c4294,4298
< <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles">
< <span class="sig-name descname"><span class="pre">_validate_input_dict_node_roles</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._validate_input_dict_node_roles" title="Permalink to this definition">¶</a></dt>
< <dd><dl class="simple">
< <dt>Validates that all nodes included in input dict are input nodes. Additionally, if any input nodes are not</dt><dd><p>included, adds them to the input dict using their default values as entries</p>
< </dd>
< </dl>
---
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.Composition._instantiate_input_dict">
> <span class="sig-name descname"><span class="pre">_instantiate_input_dict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inputs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition._instantiate_input_dict" title="Permalink to this definition">¶</a></dt>
> <dd><p>Implement dict with all INPUT Nodes of Composition as keys and their assigned inputs or defaults as values
> Validate that all Nodes included in input dict are INPUT nodes of Composition.
> If any input nodes of Composition are not included, add them to the input dict using their default values.</p>
4293c4301
< <dd class="field-odd"><p>The input dict, with added entries for any input nodes for which input was not provided</p>
---
> <dd class="field-odd"><p>Input dict, with added entries for any input Nodes for which input was not provided</p>
4856,4857c4864,4865
< <dd><p>A <a class="reference internal" href="#composition-nodes"><span class="std std-ref">Node</span></a> that is neither <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.ORIGIN" title="psyneulink.core.compositions.composition.NodeRole.ORIGIN"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">ORIGIN</span></code></a> nor <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.TERMINAL" title="psyneulink.core.compositions.composition.NodeRole.TERMINAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TERMINAL</span></code></a>.  This role cannot be modified
< programmatically.</p>
---
> <dd><p>A <a class="reference internal" href="#composition-nodes"><span class="std std-ref">Node</span></a> that is neither <a class="reference internal" href="#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> nor <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a>.  Note that it <em>can</em> also be <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.ORIGIN" title="psyneulink.core.compositions.composition.NodeRole.ORIGIN"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">ORIGIN</span></code></a>,
> <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.TERMINAL" title="psyneulink.core.compositions.composition.NodeRole.TERMINAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TERMINAL</span></code></a> or <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.SINGLETON" title="psyneulink.core.compositions.composition.NodeRole.SINGLETON"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">SINGLETON</span></code></a>, if it has no <a class="reference internal" href="Mechanism.html#id14" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span></code></a> or <a class="reference internal" href="Mechanism.html#id15" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferent</span></code></a> Projections or neither, respectively. This role cannot be modified programmatically.</p>
diff -r docs-base/CompositionFunctionApproximator.html docs-head/CompositionFunctionApproximator.html
240,242c240,242
< <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>
< and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a> provided by the OptimizationControlMechanism.
< Its <a class="reference internal" href="#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 calls its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
---
> <a class="reference internal" href="OptimizationControlMechanism.html"><span class="doc">OptimizationControlMechanism</span></a>, for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a> and a <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>
> provided by the OptimizationControlMechanism. Its <a class="reference internal" href="#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 calls
> its <a class="reference internal" href="#psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function" title="psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> to generate and return the predicted <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.net_outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">net_outcome</span></code></a> for a given set of <a class="reference internal" href="OptimizationControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values" title="psyneulink.core.components.mechanisms.modulatory.control.optimizationcontrolmechanism.OptimizationControlMechanism.state_feature_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">state_feature_values</span></code></a>, <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.control_allocation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">control_allocation</span></code></a>,
diff -r docs-base/CompositionInterfaceMechanism.html docs-head/CompositionInterfaceMechanism.html
232c232
< in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id15" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
---
> in the same way that any other Node receives inputs, from <a class="reference internal" href="Mechanism.html#id14" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.afferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">afferent</span> <span class="pre">Projections</span></code></a> (in
diff -r docs-base/InputPort.html docs-head/InputPort.html
370c370
< InputPort in the constructor for a Mechanism, and it in
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 15, 2022

This pull request introduces 2 alerts when merging 7f950fb into a64bbc5 - view on LGTM.com

new alerts:

  • 1 for Comparison using is when operands support `__eq__`
  • 1 for Unused import

@jdcpni jdcpni merged commit 1f5a70d into devel Jan 15, 2022
@jdcpni jdcpni deleted the feat/ocm/state_feat_dict branch January 15, 2022 17:42
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.

3 participants