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/learning nested #2801

Merged
merged 88 commits into from
Sep 18, 2023
Merged

Feat/learning nested #2801

merged 88 commits into from
Sep 18, 2023

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Sep 18, 2023

• autodiffComopsition.py

  • support for learning of nested AutodiffComopsitions;
    currently requires all outputs of nested Compositions to project to an OUTPUT Node of the outer (nesting) composition
    (needed for learning)

  • in PyTorch mode, no longer calls add_backpropagation_learning_pathway;
    instead, only adds TARGET nodes to composition

• pytorchmodelcreator.py:

  • moved to PytorchComositionWrapper in pytorchcompnents.py

jdcpni and others added 30 commits September 1, 2023 08:33
• composition.py
  - _parse_sender_spec(): check for CIM if sender == None and assign to sender.composition if so
• composition.py
  - various methods: learning_projection arg -> is_learning_projection
  - standardize passing of is_learning_projection arg to add_projection for all learning creation methods
  • _parse_sender_spec():  sender = sender.owner -> just projection.sender
  (passes all tests)
• composition.py
  - various methods: learning_projection arg -> is_learning_projection
  - standardize passing of is_learning_projection arg to add_projection for all learning creation methods
  • _parse_sender_spec():  sender = sender.owner -> just projection.sender
  (passes all tests)
• composition.py
  - _get_covariate_info(): change test for length of variable from >= 1 to > 1
• composition.py
  - _get_covariate_info(): change test for length of variable from >= 1 to > 1
• composition.py
  - _create_CIM_ports(): assign learnable=False to MappingProjections

  - infer_backpropagation_learning_pathways(): add support for nested compositions by bypassing CIM's

• compositioninterfacemechanism.py
  - _get_destination_info_for_ouput_CIM(): add method
• composition.py
  - infer_backpropagation_learning_pathways()
  - _get_back_prop_error_sources()
  handle nested comp (for use by autodiff, not regular Composition)
• composition.py
  - error message for nested composition in Python learning
• pytorchmodelcreator
  - __init__():
    - further refactoring to handle nested comps

• composition.py
  - infer_backpropagation_learning_pathways():
    - further refactoring to handle nested comps
• pytorchmodelcreator.py
  - forward(): don't bother with inputs to nested comp since it can get them from direct projections (created in __init__)  from collate_afferents
• autodiff.learn() execute with nested autodiff composition
(still needs validation)
• pytorchmodelcreator.py:
  move contents to pytorchcomponents.py

• PytorchModelCreator -> PytorchCompositionWrapper
• pytorchmodelcreator.py:
  move contents to pytorchcomponents.py

• PytorchModelCreator -> PytorchCompositionWrapper
• pytorchcomponents.py
  - PytorchCompositionWrapper:  add direct autodiff_projections into/out of nested Composition to pytorch_representation
• composition.py
  - infer_backpropagation_learning_pathway
    -> move to autodiffcomposition.py
• pytorchcomponents.py
  - __init__():
    - add PytorchMechanismWrapper._is_input attribute
    - flatten execution_sets and maps
  - forward(): use _is_input attribute
• pytorchcomponents.py
  - runs and updates nested comp weights
  - still needs to be validate
  (and consider simplying by just using flattened reps -- see branch learning_nested_FLATTENED_FROM_START
• autodiffcomposition.py
  - execute(): add error for learning of nested composition in Python mode (not currently supported)
jdcpni and others added 21 commits September 13, 2023 13:32
• backprop methods and nesting:
  - WORKS, before final clean-up
• backprop methods and nesting:
  - some clean-up
• backprop methods and nesting:
  - more clean-up
• backprop methods and nesting:
  - more clean-up
• composition.py,
  autodiffcomposition.py,
  compositionrunner.py:
  - refactor to get targets directly in PyTorch mode, rather than creating PNL learning components
• autodiffcomposition.py,
  compositionrunner.py:
  - refactor to get targets directly in PyTorch mode, rather than creating PNL learning components

• autodiffcomposition.py:
  change back to target_output_map
• composition.py
  - _create_non_terminal_backprop_learning_components(): deal with duplication of error_projections in overlapping pathways
…iversity/PsyNeuLink into feat/learning_nested

# Conflicts:
#	psyneulink/core/compositions/composition.py
Passes all tests
Works for 2-level nested
• test_autodiffcomposition.py:
  - TestNestedLearning:
    adding tests
• test_autodiffcomposition.py:
  - TestNestedLearning:
    adding tests
• test_autodiffcomposition.py:
  - TestNestedLearning:
    adding tests
• test_autodiffcomposition.py:
  - TestNestedLearning:
    adding tests
• test_autodiffcomposition.py:
  - TestNestedLearning tests added and pass
@github-actions
Copy link

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

diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
488a489,504
> <dt class="sig sig-object py" id="psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.infer_backpropagation_learning_pathways">
> <span class="sig-name descname"><span class="pre">infer_backpropagation_learning_pathways</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">execution_mode</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.library.compositions.autodiffcomposition.AutodiffComposition.infer_backpropagation_learning_pathways" title="Permalink to this definition">¶</a></dt>
> <dd><p>Create backpropapagation learning pathways for every Input Node –&gt; Output Node pathway
> Flattens nested compositions:</p>
> <blockquote>
> <div><ul class="simple">
> <li><p>only includes the Projections in outer Composition to/from the CIMs of the nested Composition
> (i.e., to input_CIMs and from output_CIMs) – the ones that should be learned;</p></li>
> <li><p>excludes Projections from/to CIMs in the nested Composition
> (from input_CIMs and to output_CIMs), as those should remain identity Projections;</p></li>
> </ul>
> <p>see <code class="xref any docutils literal notranslate"><span class="pre">PytorchCompositionWrapper</span></code> for table of how Projections are handled and further details.</p>
> </div></blockquote>
> </dd></dl>
> 
> <dl class="py method">
511,519c527,529
< <dd><p>Maps targets onto target mechanisms (as needed by learning)</p>
< <dl class="field-list simple">
< <dt class="field-odd">Returns</dt>
< <dd class="field-odd"><p></p>
< </dd>
< <dt class="field-even">Return type</dt>
< <dd class="field-even"><p>A dict mapping TargetMechanisms -&gt; target values</p>
< </dd>
< </dl>
---
> <dd><p>Remove input Nodes, and return dict with values for target Nodes
> :returns:
> :rtype: A dict mapping TargetMechanisms -&gt; target values</p>
612,661c622
< <dd><p>Passes inputs to any <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> receiving inputs directly from the user (via the “inputs”
< argument) then coordinates with the <a class="reference internal" href="Scheduler.html"><span class="doc">Scheduler</span></a> to execute sets of Nodes that are eligible to execute until
< <a class="reference internal" href="Scheduler.html#scheduler-termination-conditions"><span class="std std-ref">termination conditions</span></a> are met.</p>
< <dl class="field-list simple">
< <dt class="field-odd">Parameters</dt>
< <dd class="field-odd"><ul class="simple">
< <li><p><strong>inputs</strong> ({ <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a>: list } : default None) – a dictionary containing a key-value pair for each <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> in the Composition that
< receives inputs from the user. For each pair, the key is the <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> (a <a class="reference internal" href="Mechanism.html"><span class="doc">Mechanism</span></a> or <a class="reference internal" href="Composition.html"><span class="doc">Composition</span></a>) and the value is an input, the shape of which must match the Node’s
< default variable. If <strong>inputs</strong> is not specified, the <a class="reference internal" href="Component.html#component-variable"><span class="std std-ref">default_variable</span></a>
< for each <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> Node is used as its input (see <a class="reference internal" href="Composition.html#composition-execution-inputs"><span class="std std-ref">Input Formats</span></a> for
< additional details).</p></li>
< <li><p><strong>clamp_input</strong> (<em>SOFT_CLAMP : default SOFT_CLAMP</em>) – </p></li>
< <li><p><strong>runtime_params</strong> (<em>Dict</em><em>[</em><em>Node: Dict</em><em>[</em><em>Parameter: Tuple</em><em>(</em><em>Value</em><em>, </em><a class="reference internal" href="Condition.html#psyneulink.core.scheduling.condition.Condition" title="psyneulink.core.scheduling.condition.Condition"><em>Condition</em></a><em>)</em><em>]</em><em>] </em><em>: default None</em>) – specifies alternate parameter values to be used only during this <a class="reference internal" href="Log.html#psyneulink.core.globals.log.LogCondition.EXECUTION" title="psyneulink.core.globals.log.LogCondition.EXECUTION"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">EXECUTION</span></code></a> when the specified
< <a class="reference internal" href="Condition.html"><span class="doc">Condition</span></a> is met (see <a class="reference internal" href="Composition.html#composition-runtime-params"><span class="std std-ref">Runtime Parameters</span></a> for more details and examples of valid
< dictionaries).</p></li>
< <li><p><strong>skip_initialization</strong> (<em>: default False</em>) – </p></li>
< <li><p><strong>scheduler</strong> (<em>Scheduler : default None</em>) – the scheduler object that owns the conditions that will instruct the execution of the Composition
< If not specified, the Composition will use its automatically generated scheduler.</p></li>
< <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context.execution_id" title="psyneulink.core.globals.context.Context.execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">execution_id</span></code></a> : default <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.default_execution_id" title="psyneulink.core.compositions.composition.Composition.default_execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_execution_id</span></code></a>) – <a class="reference internal" href="Composition.html#composition-execution-context"><span class="std std-ref">execution context</span></a> in which the <a class="reference internal" href="Composition.html"><span class="doc">Composition</span></a> will be executed.</p></li>
< <li><p><strong>base_context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context.execution_id" title="psyneulink.core.globals.context.Context.execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">execution_id</span></code></a> : Context(execution_id=None)) – the context corresponding to the <a class="reference internal" href="Composition.html#composition-execution-context"><span class="std std-ref">execution context</span></a> from which this
< execution will be initialized, if values currently do not exist for <strong>context</strong>.</p></li>
< <li><p><strong>call_before_time_step</strong> (<em>callable : default None</em>) – called before each <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TIME_STEP" title="psyneulink.core.scheduling.time.TimeScale.TIME_STEP"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TIME_STEP</span></code></a> is executed
< passed the current <em>context</em> (but it is not necessary for your callable to take).</p></li>
< <li><p><strong>call_after_time_step</strong> (<em>callable : default None</em>) – called after each <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TIME_STEP" title="psyneulink.core.scheduling.time.TimeScale.TIME_STEP"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TIME_STEP</span></code></a> is executed
< passed the current <em>context</em> (but it is not necessary for your callable to take).</p></li>
< <li><p><strong>call_before_pass</strong> (<em>callable : default None</em>) – called before each <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.PASS" title="psyneulink.core.scheduling.time.TimeScale.PASS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PASS</span></code></a> is executed
< passed the current <em>context</em> (but it is not necessary for your callable to take).</p></li>
< <li><p><strong>call_after_pass</strong> (<em>callable : default None</em>) – called after each <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.PASS" title="psyneulink.core.scheduling.time.TimeScale.PASS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PASS</span></code></a> is executed
< passed the current <em>context</em> (but it is not necessary for your callable to take).</p></li>
< <li><p><strong>execution_mode</strong> (<em>enum.Enum</em><em>[</em><em>Auto</em><em>|</em><em>LLVM</em><em>|</em><em>LLVMexec</em><em>|</em><em>Python</em><em>|</em><em>PTXExec</em><em>] </em><em>: default Python</em>) – specifies whether to run using the Python interpreter or a <a class="reference internal" href="Composition.html#composition-compilation"><span class="std std-ref">compiled mode</span></a>.
< see <strong>execution_mode</strong> argument of <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.run" title="psyneulink.core.compositions.composition.Composition.run"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">run</span></code></a> method for additional details.</p></li>
< <li><p><strong>report_output</strong> (<em>ReportOutput : default ReportOutput.OFF</em>) – specifies whether to show output of the Composition and its <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> for the
< execution; see <a class="reference internal" href="Report.html#report-output"><span class="std std-ref">Output Reporting</span></a> for additional details and <a class="reference internal" href="Report.html#psyneulink.core.compositions.report.ReportOutput" title="psyneulink.core.compositions.report.ReportOutput"><code class="xref any py py-class docutils literal notranslate"><span class="pre">ReportOutput</span></code></a> for options.</p></li>
< <li><p><strong>report_params</strong> (<em>ReportParams : default ReportParams.OFF</em>) – specifies whether to show values the <a class="reference internal" href="Parameters.html"><span class="doc">Parameters</span></a> of the Composition and its <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a>
< for the execution; see <a class="reference internal" href="Report.html#report-output"><span class="std std-ref">Output Reporting</span></a> for additional details and <a class="reference internal" href="Report.html#psyneulink.core.compositions.report.ReportParams" title="psyneulink.core.compositions.report.ReportParams"><code class="xref any py py-class docutils literal notranslate"><span class="pre">ReportParams</span></code></a> for options.</p></li>
< <li><p><strong>report_progress</strong> (<em>ReportProgress : default ReportProgress.OFF</em>) – specifies whether to report progress of the execution; see <a class="reference internal" href="Report.html#report-progress"><span class="std std-ref">Progress Reporting</span></a> for additional details.</p></li>
< <li><p><strong>report_simulations</strong> (<em>ReportSimulations : default ReportSimulations.OFF</em>) – specifies whether to show output and/or progress for <a class="reference internal" href="OptimizationControlMechanism.html#optimizationcontrolmechanism-execution"><span class="std std-ref">simulations</span></a> executed by the Composition’s <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a>; see <a class="reference internal" href="Report.html#report-simulations"><span class="std std-ref">Simulations</span></a> for additional details.</p></li>
< <li><p><strong>report_to_devices</strong> (<em>list</em><em>(</em><a class="reference internal" href="Report.html#psyneulink.core.compositions.report.ReportDevices" title="psyneulink.core.compositions.report.ReportDevices"><em>ReportDevices</em></a><em>) </em><em>: default ReportDevices.CONSOLE</em>) – specifies where output and progress should be reported; see <code class="xref any docutils literal notranslate"><span class="pre">Report_To_Devices</span></code> for additional
< details and <a class="reference internal" href="Report.html#psyneulink.core.compositions.report.ReportDevices" title="psyneulink.core.compositions.report.ReportDevices"><code class="xref any py py-class docutils literal notranslate"><span class="pre">ReportDevices</span></code></a> for options.</p></li>
< </ul>
< </dd>
< <dt class="field-even">Returns</dt>
< <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>
< </dd>
< </dl>
---
> <dd><p>Override to execute autodiff_training() in learning mode if execute_mode is not Python</p>
diff -r docs-base/Composition.html docs-head/Composition.html
603c603,605
< nodes assigned a particular role can be listed using the <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.get_nodes_by_role" title="psyneulink.core.compositions.composition.Composition.get_nodes_by_role"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">get_nodes_by_role</span></code></a> method.</p>
---
> nodes assigned a particular role can be listed using the <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.get_nodes_by_role" title="psyneulink.core.compositions.composition.Composition.get_nodes_by_role"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">get_nodes_by_role</span></code></a> method.
> The <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.get_required_roles_by_node" title="psyneulink.core.compositions.composition.Composition.get_required_roles_by_node"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">get_required_roles_by_node</span></code></a> method lists the <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRoles</span></code></a> that have been assigned to a Node using the
> <a class="reference internal" href="#psyneulink.core.compositions.composition.Composition.require_node_roles" title="psyneulink.core.compositions.composition.Composition.require_node_roles"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">require_node_roles</span></code></a> method.</p>
625c627
< nested Composition.  The only difference between <a class="reference internal" href="#id27" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> and <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> Nodes
---
> nested Composition. The only difference between <a class="reference internal" href
...

See CI logs for the full diff.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

 - docstring additions
@github-actions
Copy link

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

diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
217c217
< <div><ul class="simple">
---
> <div><ul>
219,225c219,235
< <li><p><a class="reference internal" href="#autodiffcomposition-creation"><span class="std std-ref">Creating an AutodiffComposition</span></a></p></li>
< <li><dl class="simple">
< <dt><a class="reference internal" href="#autodiffcomposition-execution"><span class="std std-ref">Execution</span></a></dt><dd><ul>
< <li><p><a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a></p></li>
< <li><p><a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a></p></li>
< <li><p><a class="reference internal" href="#autodiffcomposition-nested-modulation"><span class="std std-ref">Nested Execution and Modulation</span></a></p></li>
< <li><p><a class="reference internal" href="#autodiffcomposition-logging"><span class="std std-ref">Logging</span></a></p></li>
---
> <li><p><a class="reference internal" href="#autodiffcomposition-creation"><span class="std std-ref">Creating an AutodiffComposition</span></a>
> - <code class="xref any docutils literal notranslate"><span class="pre">AutodiffComposition_</span></code></p>
> <blockquote>
> <div><ul class="simple">
> <li><p><a class="reference internal" href="#autodiffcomposition-modulatory-mechanisms"><span class="std std-ref">Modulatory Components</span></a></p></li>
> <li><p><a class="reference internal" href="#autodiffcomposition-bias-parameters"><span class="std std-ref">Bias Parameters</span></a></p></li>
> <li><p><a class="reference internal" href="#autodiffcomposition-nesting"><span class="std std-ref">Nesting</span></a></p></li>
> <li><p><a class="reference internal" href="#autodiffcomposition-post-construction-modification"><span class="std std-ref">Post-construction Modification</span></a></p></li>
> </ul>
> </div></blockquote>
> <ul class="simple">
> <li><p><a class="reference internal" href="#autodiffcomposition-execution"><span class="std std-ref">Execution</span></a>
> - <a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a>
> - <a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a>
> - <a class="reference internal" href="#autodiffcomposition-python"><span class="std std-ref">Python mode</span></a>
> - <a class="reference internal" href="#autodiffcomposition-nested-modulation"><span class="std std-ref">Nested Execution and Modulation</span></a>
> - <a class="reference internal" href="#autodiffcomposition-logging"><span class="std std-ref">Logging</span></a></p></li>
227,228d236
< </dd>
< </dl>
253,264c261,272
< and <a class="reference internal" href="#autodiffcomposition-examples"><span class="std std-ref">examples</span></a> below).  Note that all of the Components in an AutodiffComposition
< must be able to be subject to <a class="reference internal" href="Composition.html#composition-learning"><span class="std std-ref">learning</span></a>, but cannot include any <a class="reference internal" href="Composition.html#composition-learning-components"><span class="std std-ref">learning components</span></a> themselves.  Specifically, it cannot include any <a class="reference internal" href="ModulatoryMechanism.html"><span class="doc">ModulatoryMechanisms</span></a>, <a class="reference internal" href="LearningProjection.html"><span class="doc">LearningProjections</span></a>, or the ObjectiveMechanism &lt;OBJECTIVE_MECHANISM&gt;`
< used to compute the loss for learning.</p>
< <blockquote>
< <div><div class="admonition warning" id="autodiff-learning-components-warning">
< <p class="admonition-title">Warning</p>
< <p>When an AutodiffComposition is constructed, it creates all of the learning Components
< that are needed, and thus <strong>cannot include</strong> any that are prespecified.</p>
< </div>
< </div></blockquote>
< <p>This means that an AutodiffComposition also cannot itself include a <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a> or any
< <a class="reference internal" href="ControlMechanism.html"><span class="doc">ControlMechanisms</span></a>.  However, it can include Mechanisms that are subject to modulatory control
---
> and <a class="reference internal" href="#autodiffcomposition-examples"><span class="std std-ref">examples</span></a> below). While an AutodiffComposition can generally be created using the
> same methods as a standard Composition, there are a few restrictions that apply to its construction.</p>
> <section id="modulatory-components">
> <span id="autodiffcomposition-modulatory-mechanisms"></span><span id="autodiffcomposition-restrictions"></span><h3><em>Modulatory Components</em><a class="headerlink" href="#modulatory-components" title="Permalink to this headline">¶</a></h3>
> <p>All of the Components in an AutodiffComposition must be able to be subject to <a class="reference internal" href="Composition.html#composition-learning"><span class="std std-ref">learning</span></a>, which
> means that no <a class="reference internal" href="ModulatoryMechanism.html"><span class="doc">ModulatoryMechanisms</span></a> can be included in an AutodiffComposition.  Specifically,
> this precludes the inclusion of any <a class="reference internal" href="Composition.html#composition-learning-components"><span class="std std-ref">learning components</span></a>, <a class="reference internal" href="ControlMechanism.html"><span class="doc">ControlMechanisms</span></a>, or a <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a>.</p>
> <p id="autodiff-learning-components-warning"><em>Learning Components.</em>  An AutodiffComposition <strong>cannot include any</strong> <a class="reference internal" href="Composition.html#composition-learning-components"><span class="std std-ref">learning components</span></a> themselves (i.e., <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanisms</span></a>, <a class="reference internal" href="LearningSignal.html"><span class="doc">LearningSignals</span></a>, or LearningProjections &lt;LearningProjection&gt;`, nor the <code class="xref any docutils literal notranslate"><span class="pre">ComparatorMechanism</span></code>
> or <a class="reference internal" href="Composition.html#objective-mechanism"><span class="std std-ref">ObjectiveMechanism</span></a> used to compute the loss for learning). these are constructed
> automatically when learning is executed in <a class="reference internal" href="#autodiffcomposition-python"><span class="std std-ref">Python mode</span></a> or <a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a>, while PyTorch-compatible Components are constructed when it is executed in <a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a>.</p>
> <p><em>Control Components.</em>  An AutodiffComposition also cannot include any <a class="reference internal" href="ControlMechanism.html"><span class="doc">ControlMechanisms</span></a> or a
> <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a>.  However, it can include Mechanisms that are subject to modulatory control
269,272c277,279
< <p>A few other restrictions apply to the construction and modification of AutodiffCompositions:</p>
< <blockquote>
< <div><div class="admonition hint">
< <p class="admonition-title">Hint</p>
---
> </section>
> <section id="bias-parameters">
> <span id="autodiffcomposition-bias-parameters"></span><h3><em>Bias Parameters</em><a class="headerlink" href="#bias-parameters" title="Permalink to this headline">¶</a></h3>
274,276c281,282
< Thus, when comparing a model constructed using an AutodiffComposition to a corresponding model in PyTorch, the
< <code class="xref any docutils literal notranslate"><span class="pre">bias</span></code> parameter of PyTorch modules should be set
< to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.  Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a
---
> Thus, when constructing a model using an AutodiffComposition that corresponds to one in PyTorch, the <code class="xref any docutils literal notranslate"><span class="pre">bias</span></code> parameter of PyTorch modules should be set
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>. Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a
279a286,302
> </section>
> <section id="nesting">
> <span id="autodiffcomposition-nesting"></span><h3><em>Nesting</em><a class="headerlink" href="#nesting" title="Permalink to this headline">¶</a></h3>
> <p>An AutodiffComposition can be <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a> inside another Composition for learning, and there can
> be any level of such nestings.  However, both the outermost and all of the nested Compositions must be
> AutodiffCompositions, subject to the same restrictions as described above.  Furthermore, at every level of nesting,
> the outer Composition must have an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a>  for each of the inputs to the nested
> Composition and, similarly, an <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">Node</span></a> for each of the outputs from the nested Composition.
> That is, a nested Composition cannot directly receive an input to the outer Composition, nor can it directly provide
> an output of the outer Composition.  This is necessary for learning, as it is the Projections to and from the nested
> Composition that are subject to learning, and the INPUT and OUTPUT Nodes of the outer Composition are the sources and
> targets of those Projections, respectively.</p>
> <div class="technical-note docutils container">
> <p>Projections from <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> in an immediately enclosing outer Composition to the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.input_CIM" title="psyneulink.core.compositions.composition.Composition.input_CIM"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_CIM</span></code></a> of a nested Composition, and from its <a class="reference internal" href="Composition.html#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> to Nodes
> in the outer Composition are subject to learning;  however those within the nested Composition itself (i.e.,
> from its input_CIM to its INPUT Nodes and from its OUTPUT Nodes to its output_CIM) are <em>not</em> subject to learning,
> as they serve simply as conduits of information between the outer Composition and the nested one.</p>
283,284c306,308
< <p>Mechanisms or Projections should not be added to or deleted from an AutodiffComposition after it
< has been executed. Unlike an ordinary Composition, AutodiffComposition does not support this functionality.</p>
---
> <p>Nested Compositions are supported for learning only in <a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a>, and will
> cause an error if the <a class="reference internal" href="#psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.learn" title="psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.learn"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">learn</span></code></a> method of an AutodiffComposition is executed in
> <a class="reference internal" href="#autodiffcomposition-python"><span class="std std-ref">Python mode</span></a> or <a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a>.</p>
286c310,315
< </div></blockquote>
---
> </section>
> <section id="post-construction-modification">
> <span id="autodiffcomposition-post-construction-modification"></span><h3><em>Post-construction Modification</em><a class="headerlink" href="#post-construction-modification" title="Permalink to this headline">¶</a></h3>
> <p>Mechanisms or Projections should not be added to or deleted from an AutodiffComposition after it has
> been executed. Unlike an ordinary Composition, AutodiffComposition does not support this functionality.</p>
> </section>
295,310d323
< <section id="llvm-mode">
< <span id="autodiffcomposition-llvm"></span><h3><em>LLVM mode</em><a class="headerlink" href="#llvm-mode" title="Permalink to this headline">¶</a></h3>
< <p>This is specified by setting <strong>execution_mode</strong> = <a class="reference internal" href="LLVM.html#psyneulink.core.llvm.__init__.ExecutionMode.LLVMRun" title="psyneulink.core.llvm.__init__.ExecutionMode.LLVMRun"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">ExecutionMode.LLVMRun</span></code></a> in the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.learn" title="psyneulink.core.compositions.composition.Composition.learn"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">learn</span></code></a> method
< of an AutodiffCompositon.  This provides the fastest performance, but is limited to <a class="reference internal" href="Composition.html#composition-learning-supervised"><span class="std std-ref">supervised learning</span></a> using the <a class="reference internal" href="LearningFunctions.html#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="psyneulink.core.components.functions.learningfunctions.BackPropagation"><code class="xref any py py-class docutils literal notranslate"><span class="pre">BackPropagation</span></code></a> algorithm. This can be run using standard forms of
< loss, including mean squared error (MSE) and cross entropy, by specifying this in the <strong>loss_spec</strong> argument of
< the constructor (see <a class="reference internal" href="#autodiffcomposition-class-reference"><span class="std std-ref">AutodiffComposition</span></a> for additional details, and
< <a class="reference internal" href="Composition.html#composition-compiled-modes"><span class="std std-ref">Compilation Modes</span></a> for more information about executing a Composition in compiled mode.</p>
< <blockquote>
< <div><div class="admonition note">
< <p class="admonition-title">Note</p>
< <p>Specifying <code class="xref any docutils literal notranslate"><span class="pre">ExecutionMode.LLVMRUn</span></code> in either the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.learn" title="psyneulink.core.compositions.composition.Composition.learn"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">learn</span></code></a> and <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.run" title="psyneulink.core.compositions.composition.Composition.run"><code class="xref any py py-meth docutils literal notranslate"><s
...

See CI logs for the full diff.

…iversity/PsyNeuLink into feat/learning_nested

# Conflicts:
#	psyneulink/core/compositions/composition.py
@github-actions
Copy link

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

diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
217c217
< <div><ul class="simple">
---
> <div><ul>
219,225c219,235
< <li><p><a class="reference internal" href="#autodiffcomposition-creation"><span class="std std-ref">Creating an AutodiffComposition</span></a></p></li>
< <li><dl class="simple">
< <dt><a class="reference internal" href="#autodiffcomposition-execution"><span class="std std-ref">Execution</span></a></dt><dd><ul>
< <li><p><a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a></p></li>
< <li><p><a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a></p></li>
< <li><p><a class="reference internal" href="#autodiffcomposition-nested-modulation"><span class="std std-ref">Nested Execution and Modulation</span></a></p></li>
< <li><p><a class="reference internal" href="#autodiffcomposition-logging"><span class="std std-ref">Logging</span></a></p></li>
---
> <li><p><a class="reference internal" href="#autodiffcomposition-creation"><span class="std std-ref">Creating an AutodiffComposition</span></a>
> - <code class="xref any docutils literal notranslate"><span class="pre">AutodiffComposition_</span></code></p>
> <blockquote>
> <div><ul class="simple">
> <li><p><a class="reference internal" href="#autodiffcomposition-modulatory-mechanisms"><span class="std std-ref">Modulatory Components</span></a></p></li>
> <li><p><a class="reference internal" href="#autodiffcomposition-bias-parameters"><span class="std std-ref">Bias Parameters</span></a></p></li>
> <li><p><a class="reference internal" href="#autodiffcomposition-nesting"><span class="std std-ref">Nesting</span></a></p></li>
> <li><p><a class="reference internal" href="#autodiffcomposition-post-construction-modification"><span class="std std-ref">Post-construction Modification</span></a></p></li>
> </ul>
> </div></blockquote>
> <ul class="simple">
> <li><p><a class="reference internal" href="#autodiffcomposition-execution"><span class="std std-ref">Execution</span></a>
> - <a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a>
> - <a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a>
> - <a class="reference internal" href="#autodiffcomposition-python"><span class="std std-ref">Python mode</span></a>
> - <a class="reference internal" href="#autodiffcomposition-nested-modulation"><span class="std std-ref">Nested Execution and Modulation</span></a>
> - <a class="reference internal" href="#autodiffcomposition-logging"><span class="std std-ref">Logging</span></a></p></li>
227,228d236
< </dd>
< </dl>
253,264c261,272
< and <a class="reference internal" href="#autodiffcomposition-examples"><span class="std std-ref">examples</span></a> below).  Note that all of the Components in an AutodiffComposition
< must be able to be subject to <a class="reference internal" href="Composition.html#composition-learning"><span class="std std-ref">learning</span></a>, but cannot include any <a class="reference internal" href="Composition.html#composition-learning-components"><span class="std std-ref">learning components</span></a> themselves.  Specifically, it cannot include any <a class="reference internal" href="ModulatoryMechanism.html"><span class="doc">ModulatoryMechanisms</span></a>, <a class="reference internal" href="LearningProjection.html"><span class="doc">LearningProjections</span></a>, or the ObjectiveMechanism &lt;OBJECTIVE_MECHANISM&gt;`
< used to compute the loss for learning.</p>
< <blockquote>
< <div><div class="admonition warning" id="autodiff-learning-components-warning">
< <p class="admonition-title">Warning</p>
< <p>When an AutodiffComposition is constructed, it creates all of the learning Components
< that are needed, and thus <strong>cannot include</strong> any that are prespecified.</p>
< </div>
< </div></blockquote>
< <p>This means that an AutodiffComposition also cannot itself include a <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a> or any
< <a class="reference internal" href="ControlMechanism.html"><span class="doc">ControlMechanisms</span></a>.  However, it can include Mechanisms that are subject to modulatory control
---
> and <a class="reference internal" href="#autodiffcomposition-examples"><span class="std std-ref">examples</span></a> below). While an AutodiffComposition can generally be created using the
> same methods as a standard Composition, there are a few restrictions that apply to its construction.</p>
> <section id="modulatory-components">
> <span id="autodiffcomposition-modulatory-mechanisms"></span><span id="autodiffcomposition-restrictions"></span><h3><em>Modulatory Components</em><a class="headerlink" href="#modulatory-components" title="Permalink to this headline">¶</a></h3>
> <p>All of the Components in an AutodiffComposition must be able to be subject to <a class="reference internal" href="Composition.html#composition-learning"><span class="std std-ref">learning</span></a>, which
> means that no <a class="reference internal" href="ModulatoryMechanism.html"><span class="doc">ModulatoryMechanisms</span></a> can be included in an AutodiffComposition.  Specifically,
> this precludes the inclusion of any <a class="reference internal" href="Composition.html#composition-learning-components"><span class="std std-ref">learning components</span></a>, <a class="reference internal" href="ControlMechanism.html"><span class="doc">ControlMechanisms</span></a>, or a <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a>.</p>
> <p id="autodiff-learning-components-warning"><em>Learning Components.</em>  An AutodiffComposition <strong>cannot include any</strong> <a class="reference internal" href="Composition.html#composition-learning-components"><span class="std std-ref">learning components</span></a> themselves (i.e., <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanisms</span></a>, <a class="reference internal" href="LearningSignal.html"><span class="doc">LearningSignals</span></a>, or LearningProjections &lt;LearningProjection&gt;`, nor the <code class="xref any docutils literal notranslate"><span class="pre">ComparatorMechanism</span></code>
> or <a class="reference internal" href="Composition.html#objective-mechanism"><span class="std std-ref">ObjectiveMechanism</span></a> used to compute the loss for learning). these are constructed
> automatically when learning is executed in <a class="reference internal" href="#autodiffcomposition-python"><span class="std std-ref">Python mode</span></a> or <a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a>, while PyTorch-compatible Components are constructed when it is executed in <a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a>.</p>
> <p><em>Control Components.</em>  An AutodiffComposition also cannot include any <a class="reference internal" href="ControlMechanism.html"><span class="doc">ControlMechanisms</span></a> or a
> <a class="reference internal" href="Composition.html#composition-controller"><span class="std std-ref">controller</span></a>.  However, it can include Mechanisms that are subject to modulatory control
269,272c277,279
< <p>A few other restrictions apply to the construction and modification of AutodiffCompositions:</p>
< <blockquote>
< <div><div class="admonition hint">
< <p class="admonition-title">Hint</p>
---
> </section>
> <section id="bias-parameters">
> <span id="autodiffcomposition-bias-parameters"></span><h3><em>Bias Parameters</em><a class="headerlink" href="#bias-parameters" title="Permalink to this headline">¶</a></h3>
274,276c281,282
< Thus, when comparing a model constructed using an AutodiffComposition to a corresponding model in PyTorch, the
< <code class="xref any docutils literal notranslate"><span class="pre">bias</span></code> parameter of PyTorch modules should be set
< to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.  Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a
---
> Thus, when constructing a model using an AutodiffComposition that corresponds to one in PyTorch, the <code class="xref any docutils literal notranslate"><span class="pre">bias</span></code> parameter of PyTorch modules should be set
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>. Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a
279a286,302
> </section>
> <section id="nesting">
> <span id="autodiffcomposition-nesting"></span><h3><em>Nesting</em><a class="headerlink" href="#nesting" title="Permalink to this headline">¶</a></h3>
> <p>An AutodiffComposition can be <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a> inside another Composition for learning, and there can
> be any level of such nestings.  However, both the outermost and all of the nested Compositions must be
> AutodiffCompositions, subject to the same restrictions as described above.  Furthermore, at every level of nesting,
> the outer Composition must have an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a>  for each of the inputs to the nested
> Composition and, similarly, an <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">Node</span></a> for each of the outputs from the nested Composition.
> That is, a nested Composition cannot directly receive an input to the outer Composition, nor can it directly provide
> an output of the outer Composition.  This is necessary for learning, as it is the Projections to and from the nested
> Composition that are subject to learning, and the INPUT and OUTPUT Nodes of the outer Composition are the sources and
> targets of those Projections, respectively.</p>
> <div class="technical-note docutils container">
> <p>Projections from <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Nodes</span></a> in an immediately enclosing outer Composition to the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.input_CIM" title="psyneulink.core.compositions.composition.Composition.input_CIM"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_CIM</span></code></a> of a nested Composition, and from its <a class="reference internal" href="Composition.html#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> to Nodes
> in the outer Composition are subject to learning;  however those within the nested Composition itself (i.e.,
> from its input_CIM to its INPUT Nodes and from its OUTPUT Nodes to its output_CIM) are <em>not</em> subject to learning,
> as they serve simply as conduits of information between the outer Composition and the nested one.</p>
283,284c306,308
< <p>Mechanisms or Projections should not be added to or deleted from an AutodiffComposition after it
< has been executed. Unlike an ordinary Composition, AutodiffComposition does not support this functionality.</p>
---
> <p>Nested Compositions are supported for learning only in <a class="reference internal" href="#autodiffcomposition-pytorch"><span class="std std-ref">PyTorch mode</span></a>, and will
> cause an error if the <a class="reference internal" href="#psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.learn" title="psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.learn"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">learn</span></code></a> method of an AutodiffComposition is executed in
> <a class="reference internal" href="#autodiffcomposition-python"><span class="std std-ref">Python mode</span></a> or <a class="reference internal" href="#autodiffcomposition-llvm"><span class="std std-ref">LLVM mode</span></a>.</p>
286c310,315
< </div></blockquote>
---
> </section>
> <section id="post-construction-modification">
> <span id="autodiffcomposition-post-construction-modification"></span><h3><em>Post-construction Modification</em><a class="headerlink" href="#post-construction-modification" title="Permalink to this headline">¶</a></h3>
> <p>Mechanisms or Projections should not be added to or deleted from an AutodiffComposition after it has
> been executed. Unlike an ordinary Composition, AutodiffComposition does not support this functionality.</p>
> </section>
295,310d323
< <section id="llvm-mode">
< <span id="autodiffcomposition-llvm"></span><h3><em>LLVM mode</em><a class="headerlink" href="#llvm-mode" title="Permalink to this headline">¶</a></h3>
< <p>This is specified by setting <strong>execution_mode</strong> = <a class="reference internal" href="LLVM.html#psyneulink.core.llvm.__init__.ExecutionMode.LLVMRun" title="psyneulink.core.llvm.__init__.ExecutionMode.LLVMRun"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">ExecutionMode.LLVMRun</span></code></a> in the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.learn" title="psyneulink.core.compositions.composition.Composition.learn"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">learn</span></code></a> method
< of an AutodiffCompositon.  This provides the fastest performance, but is limited to <a class="reference internal" href="Composition.html#composition-learning-supervised"><span class="std std-ref">supervised learning</span></a> using the <a class="reference internal" href="LearningFunctions.html#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="psyneulink.core.components.functions.learningfunctions.BackPropagation"><code class="xref any py py-class docutils literal notranslate"><span class="pre">BackPropagation</span></code></a> algorithm. This can be run using standard forms of
< loss, including mean squared error (MSE) and cross entropy, by specifying this in the <strong>loss_spec</strong> argument of
< the constructor (see <a class="reference internal" href="#autodiffcomposition-class-reference"><span class="std std-ref">AutodiffComposition</span></a> for additional details, and
< <a class="reference internal" href="Composition.html#composition-compiled-modes"><span class="std std-ref">Compilation Modes</span></a> for more information about executing a Composition in compiled mode.</p>
< <blockquote>
< <div><div class="admonition note">
< <p class="admonition-title">Note</p>
< <p>Specifying <code class="xref any docutils literal notranslate"><span class="pre">ExecutionMode.LLVMRUn</span></code> in either the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.learn" title="psyneulink.core.compositions.composition.Composition.learn"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">learn</span></code></a> and <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.run" title="psyneulink.core.compositions.composition.Composition.run"><code class="xref any py py-meth docutils literal notranslate"><s
...

See CI logs for the full diff.

@jdcpni jdcpni merged commit f4cb9b4 into devel Sep 18, 2023
47 checks passed
@jdcpni jdcpni deleted the feat/learning_nested branch September 18, 2023 15:04
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.

1 participant