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/node role probe #2232

Merged
merged 273 commits into from
Dec 10, 2021
Merged

Feat/ocm/node role probe #2232

merged 273 commits into from
Dec 10, 2021

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Dec 10, 2021

• composition.py:

  • add NodeRole.PROBE
  • _create_CIM_ports(): refactor to treat NodeRole.PROBE like OUTPUT
  • move implementation of allow_probes from add_controller() to handle_probes() in _get_nested_node_CIM_port()
  • execute():
    • filter output_value (and conseqeuently results) to exclude values of PROBE nodes
    • TBD: implement same for LLVM execution

• compositioninterfacemechanism.py:

  • add _get_destination_node_for_input_port() and _get_source_node_for_output_port() methods
  • _sender_is_probe(): method uses _get_source_node_for_output_port()
  • add _sender_is_probe method

• optimizationcontrolmechanism.py

  • _instantantiate_input_ports: add allow_probes to objective_mechanism

• test_args_specific_to_ocm:

• test_control.py / test_args_specific_to_ocm:

  • add assertion regarding identification of probe (in allowable2)
  • add test that PROBE Nodes are excluded from Composition.output_values

jdcpni and others added 30 commits November 9, 2021 17:53
  - _add_controller:  modifying to instantiate feature_input_ports if none are specified
  - add_controller:  assign simulation_input_ports
  - feature_input_ports -> state_input_ports
  - _instantiate_input_ports():
      state_features only allowed to specifying state_input_ports if
      agent_rep is a CompositionFunctionApproximator (i.e., model-free optimization)

• composition.py:
  - add_controller: adds state_input_ports to shadow INPUT Nodes of Composition
    if controller.agent_rep is Composition (model-based optimziation)
    or state_features have not been specified (for model-free optimizaton)
  _instantiate_input_ports:
     reinstate allowance of state_features specification if agent_rep is a Composition
     (i.e., model-based optimization) as long as they are all INPUT Nodes of agent_rep
  - _gen_llvm_evaluate_function: num_estimates -> num_estimates_per_trial
  - _gen_llvm_evaluate_function: num_estimates -> num_trial_per_estimate
…rincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports

� Conflicts:
�	psyneulink/core/components/mechanisms/modulatory/control/optimizationcontrolmechanism.py
  - _gen_llvm_evaluate_function: num_estimates -> num_trials_per_estimate
…ut_ports

# Conflicts:
#	psyneulink/core/components/mechanisms/modulatory/control/optimizationcontrolmechanism.py
  - __init__: moved controller instantiation until after nodes, projections and pathways
  - __init__: restored add_controller position
…teger

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
…ut_ports

# Conflicts:
#	psyneulink/core/llvm/builder_context.py
  - _update_controller: added
  - add_controller and _analyze_graph(): call _update_controller
  _update_controller:  fixed to loop through all input_ports of comp INPUT nodes
  - test_agent_rep_assignement_as_controller_and_replacement:
      updated to test that shadowing projections to state_input_ports
      are properly added and deleted
jdcpni and others added 21 commits December 8, 2021 23:41
  - add NodeRole.PROBE
  - move implementation of allow_probes from add_controller() to handle_probes() in _get_nested_node_CIM_port()
  - refactor _create_CIM_ports() to treat NodeRole.PROBE like an OUTPUT
  - TBD: refactor ouput_values and results to ignore values of items in output_CIM outputports
         from NodeRole.PROBE (or make that an option)

• optimizationcontrolmechanism.py
  - _instantantiate_input_ports: add allow_probes to objective_mechanism
  - add NodeRole.PROBE
  - move implementation of allow_probes from add_controller() to handle_probes() in _get_nested_node_CIM_port()
  - refactor _create_CIM_ports() to treat NodeRole.PROBE like an OUTPUT
  - TBD: refactor ouput_values and results to ignore values of items in output_CIM outputports
         from NodeRole.PROBE (or make that an option)

• optimizationcontrolmechanism.py
  - _instantantiate_input_ports: add allow_probes to objective_mechanism
…cetonUniversity/PsyNeuLink into feat/ocm/NodeRole_PROBE

� Conflicts:
�	psyneulink/core/compositions/composition.py
…Link into feat/ocm/NodeRole_PROBE

� Conflicts:
�	psyneulink/core/components/mechanisms/modulatory/control/optimizationcontrolmechanism.py
  add _sender_is_probe method

• test_args_specific_to_ocm:
  - add assertion regarding identification of probe in allowable2
  - execute():
    - filter results to exclude values of PROBE nodes
    - TBD: implement same for LLVM execution

• compositioninterfacemechanism.py:
  add _get_destination_node_for_input_port() and _get_source_node_for_output_port() methods
  _sender_is_probe(): method uses _get_source_node_for_output_port()
  - test_args_specific_to_ocm:
    add test that PROBE nodes are excluded from Composition.output_values (and therefore results)
@github-actions
Copy link

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

diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
472,475c472,477
< <dd class="field-even"><p><strong>output value of the final Mechanism executed in the Composition</strong></p>
< </dd>
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p>various</p>
---
> <dd class="field-even"><p><ul class="simple">
> <li><p><strong>output_values</strong> (<em>List</em>)</p></li>
> <li><p><em>These are the values of the Composition’s output_CIM.output_ports, excluding those the source of which</em></p></li>
> <li><p><em>are from a (potentially nested) Node with NodeRole.PROBE in its enclosing Composition.</em></p></li>
> </ul>
> </p>
diff -r docs-base/Composition.html docs-head/Composition.html
815c815
< <figure class="align-default" id="id18">
---
> <figure class="align-default" id="id19">
822c822
< and in italics, above each Mechanism).</span><a class="headerlink" href="#id18" title="Permalink to this image">¶</a></p>
---
> and in italics, above each Mechanism).</span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
849c849
< <figure class="align-default" id="id19">
---
> <figure class="align-default" id="id20">
858c858
< one that projects to the ComparatorMechanism and assigned as the <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> Node.</span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
---
> one that projects to the ComparatorMechanism and assigned as the <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> Node.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
876c876
< <figure class="align-default" id="id20">
---
> <figure class="align-default" id="id21">
880c880
< method with the argument <code class="docutils literal notranslate"><span class="pre">animate={'show_learning':True}</span></code>.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
---
> method with the argument <code class="docutils literal notranslate"><span class="pre">animate={'show_learning':True}</span></code>.</span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
1050c1050
< <figure class="align-default" id="id21">
---
> <figure class="align-default" id="id22">
1058c1058
< Mechanism <code class="docutils literal notranslate"><span class="pre">c</span></code> on every <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TRIAL</span></code></a>.</span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
---
> Mechanism <code class="docutils literal notranslate"><span class="pre">c</span></code> on every <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TRIAL</span></code></a>.</span><a class="headerlink" href="#id22" title="Permalink to this image">¶</a></p>
3266c3266,3267
< Return relevant port of relevant CIM if found and nested Composition in which it was found, else (None, None)</p>
---
> Assign NodeRole.PROBE to relevant nodes if allow_probes is specified (see handle_probes below)
> Return relevant port of relevant CIM if found and nested Composition in which it was found; else None’s</p>
4248,4251c4249,4254
< <dd class="field-even"><p><strong>output value of the final Mechanism executed in the Composition</strong></p>
< </dd>
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p>various</p>
---
> <dd class="field-even"><p><ul class="simple">
> <li><p><strong>output_values</strong> (<em>List</em>)</p></li>
> <li><p><em>These are the values of the Composition’s output_CIM.output_ports, excluding those the source of which</em></p></li>
> <li><p><em>are from a (potentially nested) Node with NodeRole.PROBE in its enclosing Composition.</em></p></li>
> </ul>
> </p>
4450a4454,4459
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.NodeRole.PROBE">
> <span class="sig-name descname"><span class="pre">PROBE</span></span><a class="headerlink" href="#psyneulink.core.compositions.composition.NodeRole.PROBE" title="Permalink to this definition">¶</a></dt>
> <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> but that is treated as an</p>
> </dd></dl>
> 
> <dl class="py attribute">
4525a4535,4542
> </dd></dl>
> 
> <dl class="py attribute">
> <dt class="sig sig-object py" id="id18">
> <span class="sig-name descname"><span class="pre">PROBE</span></span><a class="headerlink" href="#id18" title="Permalink to this definition">¶</a></dt>
> <dd><p>An <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> <a class="reference internal" href="#composition-nodes"><span class="std std-ref">Node</span></a> that is permitted to have Projections from it to the Composition’s
> <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.output_CIM" title="psyneulink.core.compositions.composition.Composition.output_CIM"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_CIM</span></code></a>, but – unlike an <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> Node – the <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.output_values" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> of which are <em>not</em> included in the Composition’s <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attribute (see <code class="xref any docutils literal notranslate"><span class="pre">allow_probes</span></code> for an
> example.</p>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
439c439
< done automatically (see note below).</p>
---
> done automatically (see warning below).</p>
445c445
< 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
---
> 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
454c454
< <li><p><em>InputPort specification</em> – this creates an InputPort as one of the OptimizationControlMechanism’s
---
> <li><p><em>InputPort specification</em> – this creates an <a class="reference internal" href="InputPort.html"><span class="doc">InputPort</span></a> as one of the OptimizationControlMechanism’s
459c459
< <p>The InputPorts specified as state_features are marked as <code class="xref any docutils literal notranslate"><span class="pre">internal_only</span></code> = <code class="xref any docutils literal notranslate"><span class="pre">True</span></code>;</p>
---
> <p>The InputPorts specified as state_features are marked as <code class="xref any docutils literal notranslate"><span class="pre">internal_only</span></code> = <code class="xref any docutils literal notranslate"><span class="pre">True</span></code>.</p>
465c465
< <a class="reference internal" href="#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></p></li>
---
> <a class="reference internal" href="#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>.</p></li>
515,519c515,544
< <ul class="simple" id="optimizationcontrolmechanism-allow-probes">
< <li><p><strong>allow_probes</strong> – this argument is specific to OptimizationControlMechanism, allowing values of Components that
< are <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> to be
< included in <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">outcome</span></code></a> These can be thought of as providing access to “latent variables”
< of the Composition being evaluated; that is, ones that do not contribute directly to the Composition’s <a class="reference internal" href="Composition.html#composition-execution-results"><span class="std std-ref">results</span></a> (see <a class="reference internal" href="#optimizationcontrolmechanism-probes"><span class="std std-ref">probes</span></a> for additional details).</p></li>
---
> <ul id="optimizationcontrolmechanism-allow-probes">
> <li><p><strong>allow_probes</strong> – this argument is specific to OptimizationControlMechanism, and allows values of Components
> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> other than its <a class="reference internal" href="Composition.html#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> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a>
> to be specified in the <strong>monitor_for_control</strong> argument of the OptimizationControlMechanism’s constructor or,
> if <strong>objective_mechanism</strong> is specified, in the <strong>monitor</strong> argument of the ObjectiveMechanism’s constructor (see
> <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">Specifying OutputPorts to be monitored</span></a> for additional information about these specifications).  It can take the
> following values:</p>
> <ul class="simple">
> <li><p>False (default): items specified in <strong>monitor_for_control</strong> (or <strong>monitor</strong> of an ObjectiveMechanism specified
> in <strong>objective_mechanism</strong>) that are in a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> must be <a class="reference internal" href="Composition.html#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> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> of that Composition; referencing any <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> or
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> Nodes of a nested Composition raises an error.</p></li>
> <li><p>True: <em>any</em> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> can be specified in
> <strong>monitor_for_control</strong> (or <strong>monitor</strong> of an ObjectiveMechanism), including <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> and
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> nodes.</p></li>
> </ul>
> <div class="technical-note docutils container">
> <ul>
> <li><p><em>DIRECT</em>: this causes <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> and <a class="reference internal" href="Composition.html#psyneulink.core.compositions.compos
...

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/AutodiffComposition.html docs-head/AutodiffComposition.html
472,475c472,477
< <dd class="field-even"><p><strong>output value of the final Mechanism executed in the Composition</strong></p>
< </dd>
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p>various</p>
---
> <dd class="field-even"><p><ul class="simple">
> <li><p><strong>output_values</strong> (<em>List</em>)</p></li>
> <li><p><em>These are the values of the Composition’s output_CIM.output_ports, excluding those the source of which</em></p></li>
> <li><p><em>are from a (potentially nested) Node with NodeRole.PROBE in its enclosing Composition.</em></p></li>
> </ul>
> </p>
diff -r docs-base/Composition.html docs-head/Composition.html
815c815
< <figure class="align-default" id="id18">
---
> <figure class="align-default" id="id19">
822c822
< and in italics, above each Mechanism).</span><a class="headerlink" href="#id18" title="Permalink to this image">¶</a></p>
---
> and in italics, above each Mechanism).</span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
849c849
< <figure class="align-default" id="id19">
---
> <figure class="align-default" id="id20">
858c858
< one that projects to the ComparatorMechanism and assigned as the <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> Node.</span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
---
> one that projects to the ComparatorMechanism and assigned as the <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> Node.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
876c876
< <figure class="align-default" id="id20">
---
> <figure class="align-default" id="id21">
880c880
< method with the argument <code class="docutils literal notranslate"><span class="pre">animate={'show_learning':True}</span></code>.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
---
> method with the argument <code class="docutils literal notranslate"><span class="pre">animate={'show_learning':True}</span></code>.</span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
1050c1050
< <figure class="align-default" id="id21">
---
> <figure class="align-default" id="id22">
1058c1058
< Mechanism <code class="docutils literal notranslate"><span class="pre">c</span></code> on every <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TRIAL</span></code></a>.</span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
---
> Mechanism <code class="docutils literal notranslate"><span class="pre">c</span></code> on every <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TRIAL</span></code></a>.</span><a class="headerlink" href="#id22" title="Permalink to this image">¶</a></p>
3266c3266,3267
< Return relevant port of relevant CIM if found and nested Composition in which it was found, else (None, None)</p>
---
> Assign NodeRole.PROBE to relevant nodes if allow_probes is specified (see handle_probes below)
> Return relevant port of relevant CIM if found and nested Composition in which it was found; else None’s</p>
4248,4251c4249,4254
< <dd class="field-even"><p><strong>output value of the final Mechanism executed in the Composition</strong></p>
< </dd>
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p>various</p>
---
> <dd class="field-even"><p><ul class="simple">
> <li><p><strong>output_values</strong> (<em>List</em>)</p></li>
> <li><p><em>These are the values of the Composition’s output_CIM.output_ports, excluding those the source of which</em></p></li>
> <li><p><em>are from a (potentially nested) Node with NodeRole.PROBE in its enclosing Composition.</em></p></li>
> </ul>
> </p>
4450a4454,4459
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.NodeRole.PROBE">
> <span class="sig-name descname"><span class="pre">PROBE</span></span><a class="headerlink" href="#psyneulink.core.compositions.composition.NodeRole.PROBE" title="Permalink to this definition">¶</a></dt>
> <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> but that is treated as an</p>
> </dd></dl>
> 
> <dl class="py attribute">
4525a4535,4542
> </dd></dl>
> 
> <dl class="py attribute">
> <dt class="sig sig-object py" id="id18">
> <span class="sig-name descname"><span class="pre">PROBE</span></span><a class="headerlink" href="#id18" title="Permalink to this definition">¶</a></dt>
> <dd><p>An <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> <a class="reference internal" href="#composition-nodes"><span class="std std-ref">Node</span></a> that is permitted to have Projections from it to the Composition’s
> <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.output_CIM" title="psyneulink.core.compositions.composition.Composition.output_CIM"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_CIM</span></code></a>, but – unlike an <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> Node – the <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.output_values" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> of which are <em>not</em> included in the Composition’s <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attribute (see <code class="xref any docutils literal notranslate"><span class="pre">allow_probes</span></code> for an
> example.</p>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
439c439
< done automatically (see note below).</p>
---
> done automatically (see warning below).</p>
445c445
< 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
---
> 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
454c454
< <li><p><em>InputPort specification</em> – this creates an InputPort as one of the OptimizationControlMechanism’s
---
> <li><p><em>InputPort specification</em> – this creates an <a class="reference internal" href="InputPort.html"><span class="doc">InputPort</span></a> as one of the OptimizationControlMechanism’s
459c459
< <p>The InputPorts specified as state_features are marked as <code class="xref any docutils literal notranslate"><span class="pre">internal_only</span></code> = <code class="xref any docutils literal notranslate"><span class="pre">True</span></code>;</p>
---
> <p>The InputPorts specified as state_features are marked as <code class="xref any docutils literal notranslate"><span class="pre">internal_only</span></code> = <code class="xref any docutils literal notranslate"><span class="pre">True</span></code>.</p>
465c465
< <a class="reference internal" href="#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></p></li>
---
> <a class="reference internal" href="#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>.</p></li>
515,519c515,544
< <ul class="simple" id="optimizationcontrolmechanism-allow-probes">
< <li><p><strong>allow_probes</strong> – this argument is specific to OptimizationControlMechanism, allowing values of Components that
< are <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> to be
< included in <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">outcome</span></code></a> These can be thought of as providing access to “latent variables”
< of the Composition being evaluated; that is, ones that do not contribute directly to the Composition’s <a class="reference internal" href="Composition.html#composition-execution-results"><span class="std std-ref">results</span></a> (see <a class="reference internal" href="#optimizationcontrolmechanism-probes"><span class="std std-ref">probes</span></a> for additional details).</p></li>
---
> <ul id="optimizationcontrolmechanism-allow-probes">
> <li><p><strong>allow_probes</strong> – this argument is specific to OptimizationControlMechanism, and allows values of Components
> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> other than its <a class="reference internal" href="Composition.html#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> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a>
> to be specified in the <strong>monitor_for_control</strong> argument of the OptimizationControlMechanism’s constructor or,
> if <strong>objective_mechanism</strong> is specified, in the <strong>monitor</strong> argument of the ObjectiveMechanism’s constructor (see
> <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">Specifying OutputPorts to be monitored</span></a> for additional information about these specifications).  It can take the
> following values:</p>
> <ul class="simple">
> <li><p>False (default): items specified in <strong>monitor_for_control</strong> (or <strong>monitor</strong> of an ObjectiveMechanism specified
> in <strong>objective_mechanism</strong>) that are in a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> must be <a class="reference internal" href="Composition.html#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> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> of that Composition; referencing any <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> or
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> Nodes of a nested Composition raises an error.</p></li>
> <li><p>True: <em>any</em> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> can be specified in
> <strong>monitor_for_control</strong> (or <strong>monitor</strong> of an ObjectiveMechanism), including <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> and
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> nodes.</p></li>
> </ul>
> <div class="technical-note docutils container">
> <ul>
> <li><p><em>DIRECT</em>: this causes <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> and <a class="reference internal" href="Composition.html#psyneulink.core.compositions.compos
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 10, 2021

This pull request introduces 1 alert when merging eb28d2b into 52c626d - view on LGTM.com

new alerts:

  • 1 for Unused import

@github-actions
Copy link

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

diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
472,475c472,477
< <dd class="field-even"><p><strong>output value of the final Mechanism executed in the Composition</strong></p>
< </dd>
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p>various</p>
---
> <dd class="field-even"><p><ul class="simple">
> <li><p><strong>output_values</strong> (<em>List</em>)</p></li>
> <li><p><em>These are the values of the Composition’s output_CIM.output_ports, excluding those the source of which</em></p></li>
> <li><p><em>are from a (potentially nested) Node with NodeRole.PROBE in its enclosing Composition.</em></p></li>
> </ul>
> </p>
diff -r docs-base/Composition.html docs-head/Composition.html
815c815
< <figure class="align-default" id="id18">
---
> <figure class="align-default" id="id19">
822c822
< and in italics, above each Mechanism).</span><a class="headerlink" href="#id18" title="Permalink to this image">¶</a></p>
---
> and in italics, above each Mechanism).</span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
849c849
< <figure class="align-default" id="id19">
---
> <figure class="align-default" id="id20">
858c858
< one that projects to the ComparatorMechanism and assigned as the <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> Node.</span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
---
> one that projects to the ComparatorMechanism and assigned as the <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> Node.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
876c876
< <figure class="align-default" id="id20">
---
> <figure class="align-default" id="id21">
880c880
< method with the argument <code class="docutils literal notranslate"><span class="pre">animate={'show_learning':True}</span></code>.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
---
> method with the argument <code class="docutils literal notranslate"><span class="pre">animate={'show_learning':True}</span></code>.</span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
1050c1050
< <figure class="align-default" id="id21">
---
> <figure class="align-default" id="id22">
1058c1058
< Mechanism <code class="docutils literal notranslate"><span class="pre">c</span></code> on every <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TRIAL</span></code></a>.</span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
---
> Mechanism <code class="docutils literal notranslate"><span class="pre">c</span></code> on every <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TRIAL</span></code></a>.</span><a class="headerlink" href="#id22" title="Permalink to this image">¶</a></p>
3266c3266,3267
< Return relevant port of relevant CIM if found and nested Composition in which it was found, else (None, None)</p>
---
> Assign NodeRole.PROBE to relevant nodes if allow_probes is specified (see handle_probes below)
> Return relevant port of relevant CIM if found and nested Composition in which it was found; else None’s</p>
4248,4251c4249,4254
< <dd class="field-even"><p><strong>output value of the final Mechanism executed in the Composition</strong></p>
< </dd>
< <dt class="field-odd">Return type</dt>
< <dd class="field-odd"><p>various</p>
---
> <dd class="field-even"><p><ul class="simple">
> <li><p><strong>output_values</strong> (<em>List</em>)</p></li>
> <li><p><em>These are the values of the Composition’s output_CIM.output_ports, excluding those the source of which</em></p></li>
> <li><p><em>are from a (potentially nested) Node with NodeRole.PROBE in its enclosing Composition.</em></p></li>
> </ul>
> </p>
4450a4454,4459
> <dt class="sig sig-object py" id="psyneulink.core.compositions.composition.NodeRole.PROBE">
> <span class="sig-name descname"><span class="pre">PROBE</span></span><a class="headerlink" href="#psyneulink.core.compositions.composition.NodeRole.PROBE" title="Permalink to this definition">¶</a></dt>
> <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> but that is treated as an</p>
> </dd></dl>
> 
> <dl class="py attribute">
4525a4535,4542
> </dd></dl>
> 
> <dl class="py attribute">
> <dt class="sig sig-object py" id="id18">
> <span class="sig-name descname"><span class="pre">PROBE</span></span><a class="headerlink" href="#id18" title="Permalink to this definition">¶</a></dt>
> <dd><p>An <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> <a class="reference internal" href="#composition-nodes"><span class="std std-ref">Node</span></a> that is permitted to have Projections from it to the Composition’s
> <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.output_CIM" title="psyneulink.core.compositions.composition.Composition.output_CIM"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_CIM</span></code></a>, but – unlike an <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> Node – the <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.output_values" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> of which are <em>not</em> included in the Composition’s <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attribute (see <code class="xref any docutils literal notranslate"><span class="pre">allow_probes</span></code> for an
> example.</p>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
439c439
< done automatically (see note below).</p>
---
> done automatically (see warning below).</p>
445c445
< 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
---
> 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
454c454
< <li><p><em>InputPort specification</em> – this creates an InputPort as one of the OptimizationControlMechanism’s
---
> <li><p><em>InputPort specification</em> – this creates an <a class="reference internal" href="InputPort.html"><span class="doc">InputPort</span></a> as one of the OptimizationControlMechanism’s
459c459
< <p>The InputPorts specified as state_features are marked as <code class="xref any docutils literal notranslate"><span class="pre">internal_only</span></code> = <code class="xref any docutils literal notranslate"><span class="pre">True</span></code>;</p>
---
> <p>The InputPorts specified as state_features are marked as <code class="xref any docutils literal notranslate"><span class="pre">internal_only</span></code> = <code class="xref any docutils literal notranslate"><span class="pre">True</span></code>.</p>
465c465
< <a class="reference internal" href="#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></p></li>
---
> <a class="reference internal" href="#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>.</p></li>
515,519c515,544
< <ul class="simple" id="optimizationcontrolmechanism-allow-probes">
< <li><p><strong>allow_probes</strong> – this argument is specific to OptimizationControlMechanism, allowing values of Components that
< are <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> to be
< included in <a class="reference internal" href="ControlMechanism.html#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.outcome" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.outcome"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">outcome</span></code></a> These can be thought of as providing access to “latent variables”
< of the Composition being evaluated; that is, ones that do not contribute directly to the Composition’s <a class="reference internal" href="Composition.html#composition-execution-results"><span class="std std-ref">results</span></a> (see <a class="reference internal" href="#optimizationcontrolmechanism-probes"><span class="std std-ref">probes</span></a> for additional details).</p></li>
---
> <ul id="optimizationcontrolmechanism-allow-probes">
> <li><p><strong>allow_probes</strong> – this argument is specific to OptimizationControlMechanism, and allows values of Components
> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> other than its <a class="reference internal" href="Composition.html#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> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a>
> to be specified in the <strong>monitor_for_control</strong> argument of the OptimizationControlMechanism’s constructor or,
> if <strong>objective_mechanism</strong> is specified, in the <strong>monitor</strong> argument of the ObjectiveMechanism’s constructor (see
> <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">Specifying OutputPorts to be monitored</span></a> for additional information about these specifications).  It can take the
> following values:</p>
> <ul class="simple">
> <li><p>False (default): items specified in <strong>monitor_for_control</strong> (or <strong>monitor</strong> of an ObjectiveMechanism specified
> in <strong>objective_mechanism</strong>) that are in a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> must be <a class="reference internal" href="Composition.html#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> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> of that Composition; referencing any <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> or
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> Nodes of a nested Composition raises an error.</p></li>
> <li><p>True: <em>any</em> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested Composition</span></a> can be specified in
> <strong>monitor_for_control</strong> (or <strong>monitor</strong> of an ObjectiveMechanism), including <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> and
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INTERNAL" title="psyneulink.core.compositions.composition.NodeRole.INTERNAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INTERNAL</span></code></a> nodes.</p></li>
> </ul>
> <div class="technical-note docutils container">
> <ul>
> <li><p><em>DIRECT</em>: this causes <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> and <a class="reference internal" href="Composition.html#psyneulink.core.compositions.compos
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 10, 2021

This pull request introduces 1 alert when merging 8186e9e into 52c626d - view on LGTM.com

new alerts:

  • 1 for Unused import

@jdcpni jdcpni merged commit ee1f894 into devel Dec 10, 2021
@jdcpni jdcpni deleted the feat/ocm/NodeRole_PROBE branch December 10, 2021 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants