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

Devel #3129

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open

Devel #3129

wants to merge 44 commits into from

Conversation

kmantel
Copy link
Collaborator

@kmantel kmantel commented Nov 26, 2024

No description provided.

dependabot bot and others added 30 commits November 13, 2024 10:35
Updates the requirements on [optuna](https://github.com/optuna/optuna) to permit the latest version.
- [Release notes](https://github.com/optuna/optuna/releases)
- [Commits](optuna/optuna@v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: optuna
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Results, errors, warning, are testid independently for each value of
tested softmax_choice parameter.

Signed-off-by: Jan Vesely <[email protected]>
Simplify implementation.
Handle multidimensional arrays.

Signed-off-by: Jan Vesely <[email protected]>
Parameter.set checks for Component values assigned after
its owning Component's __init__ so that the assigned Components
can be shaped compatibly and set up for later context initialization.

Check for ContextFlags.INITIALIZED initialization_status instead of
is_initialized, because is_initialized also considers any initialization
context, not just the status of having completed Component.__init__
• transformfunctions.py
  - MatrixTransform:  allow normaliation for L0

• emcomposition.py
  - enforce normalize_memories for len(keys)==1

• test_emcomposition.py
  - test_simple_execution_without_learning():  add tests for scalar keys & use of L0 in MatrixTransform
* • emcomposition.py
  - add field_weights setter and getter
  - field_weights_setter(): check that value node is not be assigned a weight

• mechanism.py
  Mechanism_Base.execute():  add check whether any input_ports have default_input set in determining whether or not to to call _update_input_ports
* • recurrenttransfermechanism.py
  - _instantiate_attributes_after_function():  fix assignment of StabilityFunction, and force update of default_variable for output_port

•  _instantiate_attributes_after_function:
  revise call to _update_default_variable to use energy.variable instead of value

* • test_recurrent_transfer_mechanism.py
  - TestStandardOutputPorts:
    test_rtn_energy()
    test_rtn_entropy()

* • recurrenttransfermechanism.py
  _instantiate_attributes_after_function():
    refactor to assign functions for ENERGY and ENTROPY standard_output_ports before call to super()
otherwise, calls to execute with no input may ignore port default_input
in favor of execution with Mechanism.defaults.variable
if a port has default_input, this value should be used instead of any
values from incoming projections
Updates the requirements on [grpcio](https://github.com/grpc/grpc) to permit the latest version.
- [Release notes](https://github.com/grpc/grpc/releases)
- [Changelog](https://github.com/grpc/grpc/blob/master/doc/grpc_release_schedule.md)
- [Commits](grpc/grpc@v1.67.0...v1.68.0)

---
updated-dependencies:
- dependency-name: grpcio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The other modes will be update to match generalized Python behaviour.

Signed-off-by: Jan Vesely <[email protected]>
…ISTIC

Allow output of multiple extremes.
Enable tests.

Still TODO:
 * mode==DETERMINISTIC
 * tie==RANDOM (only used with mode==DETERMINISTIC)
 * 2d arguments

Signed-off-by: Jan Vesely <[email protected]>
Not needed since OneHot now supports all modes != DETERMINISTIC
Cleanup codestyle.

Signed-off-by: Jan Vesely <[email protected]>
Remove call_elementwise_operation helper.

Signed-off-by: Jan Vesely <[email protected]>
…DETERMINISTIC mode

Drop random_state and seed if "tie" is not RANDOM

Signed-off-by: Jan Vesely <[email protected]>
Use "recursive_iterate_arrays" to support 2d input.

Signed-off-by: Jan Vesely <[email protected]>
Change test name to include "int32"
Use np.uint32 type for numpy PRNG

Signed-off-by: Jan Vesely <[email protected]>
Uses Lemire's algorithm [0].
Applies to Philox PRNG using "integers" API call,
"randint" uses older, "masked rejection sampling" approach.

[0] https://arxiv.org/abs/1805.10941

Signed-off-by: Jan Vesely <[email protected]>
Uses bit masked rejection sampling of lower bits.
Matches to Numpy's Random.randint API call.

Signed-off-by: Jan Vesely <[email protected]>
It no longer needs to fit search for extreme values.

Signed-off-by: Jan Vesely <[email protected]>
Refactor Python OneHot implementation.
Add tests for OneHot(mode=DETERMINISTIC).

Refactor compiled OneHot to isolate PROB and PROB_INDICATOR.
Convert recursive traversal of arrays from generator to context manager.

Implement compiled random integer generation for bounded integers.
Implement all OneHot modes in compiled mode.
* • emcomposition.py
  -  add field class
  - refactor to use fields for all node attributes/arrays
* • emcomposition.py
  assign memory indices in field-order

• test_emcomposition.py
  - test_order_fields_in_memory
Comment on lines +354 to +355
# elif isinstance(matrix, ParameterPort):
# pass

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +2713 to +2714
# except:
# raise ShowGraphError(f"Problem displaying graph for {composition.name}")

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
@@ -193,10 +193,11 @@

from psyneulink.core import llvm as pnlvm
from psyneulink.core.components.component import _get_parametervalue_attr
from psyneulink.core.components.functions.nonstateful.transferfunctions import Linear

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
psyneulink.core.components.functions.nonstateful.transferfunctions
begins an import cycle.
@@ -193,10 +193,11 @@

from psyneulink.core import llvm as pnlvm
from psyneulink.core.components.component import _get_parametervalue_attr
from psyneulink.core.components.functions.nonstateful.transferfunctions import Linear

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Linear' is not used.
from psyneulink.core.components.functions.nonstateful.transformfunctions import LinearCombination
from psyneulink.core.components.functions.function import Function, get_matrix
from psyneulink.core.components.functions.nonstateful.learningfunctions import Hebbian
from psyneulink.core.components.functions.nonstateful.objectivefunctions import Stability
from psyneulink.core.components.functions.nonstateful.objectivefunctions import Stability, Energy, Entropy

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
psyneulink.core.components.functions.nonstateful.objectivefunctions
begins an import cycle.
from psyneulink.core.components.functions.nonstateful.transformfunctions import LinearCombination
from psyneulink.core.components.functions.function import Function, get_matrix
from psyneulink.core.components.functions.nonstateful.learningfunctions import Hebbian
from psyneulink.core.components.functions.nonstateful.objectivefunctions import Stability
from psyneulink.core.components.functions.nonstateful.objectivefunctions import Stability, Energy, Entropy

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Stability' is not used.
from psyneulink.core.compositions import NodeRole
from psyneulink.core.compositions.showgraph import ShowGraph, SHOW_JUST_LEARNING_PROJECTIONS
from psyneulink.core.compositions.showgraph import ShowGraph, SHOW_JUST_LEARNING_PROJECTIONS, SHOW_LEARNING

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'SHOW_JUST_LEARNING_PROJECTIONS' is not used.
from psyneulink.core.globals.keywords import BOLD, NESTED, INSET
from psyneulink.core.llvm import ExecutionMode
from psyneulink.core.globals.context import ContextFlags, handle_external_context
from psyneulink.core.globals.keywords import BOLD, INSET, NESTED, PNL

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'BOLD' is not used.
Import of 'INSET' is not used.
Import of 'NESTED' is not used.
Copy link

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5706c5706
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
diff -r docs-base/ControlMechanism.html docs-head/ControlMechanism.html
391c391
< (<code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
---
> (<a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
394,395c394,395
< attributes explicitly specified in its construction – are used.  In that case, if the <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> with
< <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter are still desired, this must be explicitly
---
> attributes explicitly specified in its construction – are used.  In that case, if the <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> with
> <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter are still desired, this must be explicitly
404c404
< <p>Notice that <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> <p>Notice that <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
413c413
< which is a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function with <em>SUM</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> which is a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function with <em>SUM</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
703c703
< <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> as its
---
> <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <a class="reference internal" 
...

See CI logs for the full diff.

* • emcomposition.py
  fix bug in field.memories property

• test_emcomposition.py
  test_order_fields_in_memory: add tests for field.type and memory alignment
Copy link

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5706c5706
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
diff -r docs-base/ControlMechanism.html docs-head/ControlMechanism.html
391c391
< (<code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
---
> (<a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
394,395c394,395
< attributes explicitly specified in its construction – are used.  In that case, if the <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> with
< <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter are still desired, this must be explicitly
---
> attributes explicitly specified in its construction – are used.  In that case, if the <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> with
> <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter are still desired, this must be explicitly
404c404
< <p>Notice that <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> <p>Notice that <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
413c413
< which is a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function with <em>SUM</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> which is a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function with <em>SUM</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
703c703
< <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> as its
---
> <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <a class="reference internal" 
...

See CI logs for the full diff.

@coveralls
Copy link

coveralls commented Nov 26, 2024

Coverage Status

coverage: 83.95% (+0.2%) from 83.721%
when pulling ff4a3e6 on devel
into cc0a663 on master.

kmantel and others added 3 commits November 26, 2024 05:04
version is unavailable. match exclusion in other workflows
- exclude unavailable macos-11 on py3.7 
- add matrix.dist to test result artifact to avoid duplication
Copy link

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5706c5706
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
diff -r docs-base/ControlMechanism.html docs-head/ControlMechanism.html
391c391
< (<code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
---
> (<a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
394,395c394,395
< attributes explicitly specified in its construction – are used.  In that case, if the <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> with
< <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter are still desired, this must be explicitly
---
> attributes explicitly specified in its construction – are used.  In that case, if the <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> with
> <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter are still desired, this must be explicitly
404c404
< <p>Notice that <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> <p>Notice that <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
413c413
< which is a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function with <em>SUM</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> which is a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function with <em>SUM</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
703c703
< <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> as its
---
> <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <a class="reference internal" 
...

See CI logs for the full diff.

jdcpni and others added 2 commits November 26, 2024 10:51
* -

* [skip ci]

* [skip ci]

* • composition.py
  - suppress warning about adding CONTROL_OBJECTIVE NodeRole if ObjectiveMechanism is already associated with a ControlMechanism

* -
Easier to track progress.

Signed-off-by: Jan Vesely <[email protected]>
Copy link

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5706c5706
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
diff -r docs-base/ControlMechanism.html docs-head/ControlMechanism.html
391c391
< (<code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
---
> (<a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
394,395c394,395
< attributes explicitly specified in its construction – are used.  In that case, if the <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> with
< <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter are still desired, this must be explicitly
---
> attributes explicitly specified in its construction – are used.  In that case, if the <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> with
> <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter are still desired, this must be explicitly
404c404
< <p>Notice that <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> <p>Notice that <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> was assigned as the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> of the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>, and <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
413c413
< which is a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function with <em>SUM</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter.</p>
---
> which is a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function with <em>SUM</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter.</p>
703c703
< <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> as its
---
> <em>OUTCOME</em>.  If <em>COMBINE</em> is specified, the <em>OUTCOME</em> InputPort  is assigned <a class="reference internal" 
...

See CI logs for the full diff.

* • composition.py
  - suppress warning about adding CONTROL_OBJECTIVE NodeRole if ObjectiveMechanism is already associated with a ControlMechanism

• lccontrolmechanism.py
  - _instantiate_objective_mechanism():  implement default ObjectiveMechanism with CombineMeans
  - _instantiate_control_signals:
    complete implementation of ALL

* • test_control_mechanism.py
  test_lc_control_monitored_and_modulated_mechanisms_composition(): augmented to test implementation of ObjectiveMechanism
@@ -2912,7 +2912,7 @@
from psyneulink.core.components.mechanisms.modulatory.modulatorymechanism import ModulatoryMechanism_Base
from psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism import CompositionInterfaceMechanism
from psyneulink.core.components.mechanisms.processing.objectivemechanism import ObjectiveMechanism
from psyneulink.core.components.mechanisms.processing.processingmechanism import ProcessingMechanism
from psyneulink.core.components.mechanisms.processing.processingmechanism import ProcessingMechanism, ProcessingMechanism_Base

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
psyneulink.core.components.mechanisms.processing.processingmechanism
begins an import cycle.
assert T_1.parameter_ports[pnl.SLOPE].mod_afferents[0] in LC.control_signals[0].efferents
assert T_2.parameter_ports[pnl.SLOPE].mod_afferents[0] in LC.control_signals[0].efferents

result = C.run(inputs={T_1:[1,2]})#, T_2:[3,4,5]

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable result is not used.
Copy link

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5706c5706
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
diff -r docs-base/ControlMechanism.html docs-head/ControlMechanism.html
386c386
< its corresponding <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a>.  When the Composition is run, the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>(s) of the OutputPort(s) monitored are evaluated using the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>'s <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a>, and the result is assigned to its <em>OUTCOME</em> <a class="reference internal" href="ObjectiveMechanism.html#objectivemechanism-output"><span class="std std-ref">output_port</span></a>.  That <code class="xref any docutils literal notranslate"><span class="pre">value</span></code> is then passed to the ControlMechanism’s
---
> its corresponding <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a>.  When the Composition is run, the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>(s) of the OutputPort(s) monitored are evaluated using the <a class="reference internal" href="LCControlMechanism.html#psyneulink.library.components.mechanisms.modulatory.control.agt.lccontrolmechanism.LCControlMechanism.objective_mechanism" title="psyneulink.library.components.mechanisms.modulatory.control.agt.lccontrolmechanism.LCControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>'s <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a>, and the result is assigned to its <em>OUTCOME</em> <a class="reference internal" href="ObjectiveMechanism.html#objectivemechanism-output"><span class="std std-ref">output_port</span></a>.  That <code class="xref any docutils literal notranslate"><span class="pre">value</span></code> is then passed to the ControlMechanism’s
391c391
< (<code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
---
> (<a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
394,395c394,395
< attributes explicitly specified in its construction – are used.  In that case, if the <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> with
< <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter are still desired, this must be explicitly
---
> attributes explicitly specified in its construction – are used.  In that case, if the <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> with
> <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter are still desired, this must be explicitly
404c404
< <p>Notice that <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> was assigned as the <a cl
...

See CI logs for the full diff.

….2 (#3135)

Updates the requirements on [pytest-profiling](https://github.com/man-group/pytest-plugins) to permit the latest version.
- [Release notes](https://github.com/man-group/pytest-plugins/releases)
- [Changelog](https://github.com/man-group/pytest-plugins/blob/master/CHANGES.md)
- [Commits](man-group/pytest-plugins@v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: pytest-profiling
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5706c5706
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
diff -r docs-base/ControlMechanism.html docs-head/ControlMechanism.html
386c386
< its corresponding <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a>.  When the Composition is run, the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>(s) of the OutputPort(s) monitored are evaluated using the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>'s <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a>, and the result is assigned to its <em>OUTCOME</em> <a class="reference internal" href="ObjectiveMechanism.html#objectivemechanism-output"><span class="std std-ref">output_port</span></a>.  That <code class="xref any docutils literal notranslate"><span class="pre">value</span></code> is then passed to the ControlMechanism’s
---
> its corresponding <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a>.  When the Composition is run, the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>(s) of the OutputPort(s) monitored are evaluated using the <a class="reference internal" href="LCControlMechanism.html#psyneulink.library.components.mechanisms.modulatory.control.agt.lccontrolmechanism.LCControlMechanism.objective_mechanism" title="psyneulink.library.components.mechanisms.modulatory.control.agt.lccontrolmechanism.LCControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a>'s <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a>, and the result is assigned to its <em>OUTCOME</em> <a class="reference internal" href="ObjectiveMechanism.html#objectivemechanism-output"><span class="std std-ref">output_port</span></a>.  That <code class="xref any docutils literal notranslate"><span class="pre">value</span></code> is then passed to the ControlMechanism’s
391c391
< (<code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
---
> (<a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>), but using <em>PRODUCT</em> (rather than the default, <em>SUM</em>) as the value of the function’s <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter. The result is that the <a class="reference internal" href="#psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism" title="psyneulink.core.components.mechanisms.modulatory.control.controlmechanism.ControlMechanism.objective_mechanism"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">objective_mechanism</span></code></a> multiplies the <a class="reference internal" href="OutputPort.html#psyneulink.core.components.ports.outputport.OutputPort.value" title="psyneulink.core.components.ports.outputport.OutputPort.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a>s of the OutputPorts that it
394,395c394,395
< attributes explicitly specified in its construction – are used.  In that case, if the <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> with
< <em>PRODUCT</em> as its <code class="xref any docutils literal notranslate"><span class="pre">operation</span></code> parameter are still desired, this must be explicitly
---
> attributes explicitly specified in its construction – are used.  In that case, if the <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> with
> <em>PRODUCT</em> as its <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination.operation" title="psyneulink.core.components.functions.transformfunctions.LinearCombination.operation"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">operation</span></code></a> parameter are still desired, this must be explicitly
404c404
< <p>Notice that <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> was assigned as the <a cl
...

See CI logs for the full diff.

* • composition.py
  - reset():  add clear_results arg
Copy link

github-actions bot commented Dec 2, 2024

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5419,5423c5419,5426
< <span class="sig-name descname"><span class="pre">reset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_unspecified_nodes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</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">NotImplemented</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition.reset" title="Permalink to this definition">¶</a></dt>
< <dd><p>If the component’s execute method involves execution of an <a class="reference internal" href="IntegratorFunctions.html#psyneulink.core.components.functions.stateful.integratorfunctions.IntegratorFunction" title="psyneulink.core.components.functions.stateful.integratorfunctions.IntegratorFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">IntegratorFunction</span></code></a> Function, this method
< effectively begins the function’s accumulation over again at the specified value, and may update related
< values on the component, depending on the component type.  Otherwise, it simply reassigns the Component’s
< value based on its default_variable.</p>
---
> <span class="sig-name descname"><span class="pre">reset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_unspecified_nodes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clear_results</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</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">NotImplemented</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition.reset" title="Permalink to this definition">¶</a></dt>
> <dd><p>Reset all stateful functions in the Composition to their initial values.</p>
> <p>If <strong>values</strong> is provided, the <a class="reference internal" href="StatefulFunction.html#psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value" title="psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">previous_value</span></code></a> of the corresponding
> <a class="reference internal" href="StatefulFunction.html"><span class="doc">stateful functions</span></a> are set to the values specified. If a value is not provided for a
> given node, the <a class="reference internal" href="StatefulFunction.html#psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value" title="psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">previous_value</span></code></a> is set to the value of its <a class="reference internal" href="StatefulFunction.html#psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.initializer" title="psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.initializer"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">initializer</span></code></a>.</p>
> <p>If <strong>include_unspecified_nodes</strong> is False, then all nodes must have corresponding reset values.
> The <code class="xref any docutils literal notranslate"><span class="pre">DEFAULT</span></code> keyword can be used in lieu of a numerical value to reset a node’s value to its default.</p>
> <p>If <strong>clear_results</strong> is True, the <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 is set to an empty list.</p>
5429,5434c5432,5438
< <dd><p>Initializes the values of nodes within cycles. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is True and a value is
< provided for a given node, the node will be initialized to that value. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is
< True and a value is not provided, the node will be initialized to its default value. If
< <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is False, then all nodes must have corresponding initialization values. The
< <code class="xref any docutils literal notranslate"><span class="pre">DEFAULT</span></code> keyword can be used in lieu of a numerical value to reset a node’s value to its default.</p>
< <p>If a context is not provided, the most recent context under which the Composition has executed will be used.</p>
---
> <dd><p>Initialize the values of nodes within cycles.
> If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is True and a value is provided for a given node, the node is initialized to
> that value. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is  True and a value is not provided, the node is initialized to
> its default value. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is False, then all nodes must have corresponding
> initialization values. The <code class="xref any docutils literal notranslate"><span class="pre">DEFAULT</span></code> keyword can be used in lieu of a numerical value to reset a node’s value
> to its default.</p>
> <p>If a context is not provided, the most recent context under which the Composition has executed is used.</p>
5438,5439c5442,5443
< <li><p><strong>values</strong> (<em>Dict { Node: Node Value }</em>) – A dictionary contaning key-value pairs of Nodes and initialization values. Nodes within cycles that are
< not included in this dict will be initialized to their default values.</p></li>
---
> <li><p><strong>values</strong> (<em>Dict { Node: Node Value }</em>) – A dictionary containing key-value pairs of Nodes and initialization values. Nodes within cycles that are
> not included in this dict are initialized to their default values.</p></li>
5442c5446
< <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context" title="psyneulink.core.globals.context.Context"><em>Context</em></a>) – The context under which the nodes should be initialized. context will be set to
---
> <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context" title="psyneulink.core.globals.context.Context"><em>Context</em></a>) – The context under which the nodes should be initialized. context are set to
5706c5710
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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 docu
...

See CI logs for the full diff.

Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@8.3.3...8.3.4)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link

github-actions bot commented Dec 3, 2024

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

diff -r docs-base/AutoAssociativeProjection.html docs-head/AutoAssociativeProjection.html
297c297
< <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code>) to
---
> <li><p><strong>matrix</strong> (<em>list</em><em>, </em><em>np.ndarray</em><em>, </em><em>function</em><em> or </em><em>keyword : default DEFAULT_MATRIX</em>) – specifies the matrix used by <a class="reference internal" href="Projection.html#psyneulink.core.components.projections.projection.Projection_Base.function" title="psyneulink.core.components.projections.projection.Projection_Base.function"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span></code></a> (default: <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a>) to
diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
288,291c288,296
< 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
< TransferMechanism that projects to the relevant Mechanism (i.e., implementing that layer of the network to
< receive the biases) using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that
< implements a diagnoal matrix with values corresponding to the initial value of the biases.</p>
---
> to <code class="xref any docutils literal notranslate"><span class="pre">False</span></code>.</p>
> <blockquote>
> <div><p>Trainable biases <em>can</em> be specified explicitly in an AutodiffComposition by including a <a class="reference internal" href="ProcessingMechanism.html"><span class="doc">ProcessingMechanism</span></a>
> that projects to the relevant Mechanism (i.e., implementing that layer of the network to receive the biases)
> using a <a class="reference internal" href="MappingProjection.html"><span class="doc">MappingProjection</span></a> with a <a class="reference internal" href="MappingProjection.html#psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix" title="psyneulink.core.components.projections.pathway.mappingprojection.MappingProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter that implements a diagnoal
> matrix with values corresponding to the initial value of the biases, and setting the <a class="reference internal" href="InputPort.html#psyneulink.core.components.ports.inputport.InputPort.default_input" title="psyneulink.core.components.ports.inputport.InputPort.default_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_input</span></code></a> Parameter of one of the ProcessingMechanism’s <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.input_ports"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">input_ports</span></code></a> to <em>DEFAULT_VARIABLE</em>, and its <code class="xref any docutils literal notranslate"><span class="pre">default_variable</span></code>
> equal to 1. ProcessingMechanisms configured in this way are assigned <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole" title="psyneulink.core.compositions.composition.NodeRole"><code class="xref any py py-class docutils literal notranslate"><span class="pre">NodeRole</span></code></a> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.BIAS" title="psyneulink.core.compositions.composition.NodeRole.BIAS"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">BIAS</span></code></a>, and the MappingProjection
> is subject to learning.</p>
> </div></blockquote>
Only in docs-base: CombinationFunctions.html
diff -r docs-base/ComparatorMechanism.html docs-head/ComparatorMechanism.html
270c270
< InputPorts.  By default, it uses a <code class="xref any docutils literal notranslate"><span class="pre">LinearCombination</span></code> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
---
> InputPorts.  By default, it uses a <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.LinearCombination" title="psyneulink.core.components.functions.transformfunctions.LinearCombination"><code class="xref any py py-class docutils literal notranslate"><span class="pre">LinearCombination</span></code></a> function, assigning the sample InputPort a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>-1</em> and the target a <code class="xref any docutils literal notranslate"><span class="pre">weight</span></code> of <em>1</em>, so that the sample
diff -r docs-base/Composition.html docs-head/Composition.html
4480c4480
< <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <code class="xref any docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code>.</p>
---
> <a class="reference internal" href="PredictionErrorMechanism.html"><span class="doc">PredictionErrorMechanism</span></a> is used, which uses as its fuction <a class="reference internal" href="TransformFunctions.html#psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction" title="psyneulink.core.components.functions.transformfunctions.PredictionErrorDeltaFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">PredictionErrorDeltaFunction</span></code></a>.</p>
5419,5423c5419,5426
< <span class="sig-name descname"><span class="pre">reset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_unspecified_nodes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</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">NotImplemented</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition.reset" title="Permalink to this definition">¶</a></dt>
< <dd><p>If the component’s execute method involves execution of an <a class="reference internal" href="IntegratorFunctions.html#psyneulink.core.components.functions.stateful.integratorfunctions.IntegratorFunction" title="psyneulink.core.components.functions.stateful.integratorfunctions.IntegratorFunction"><code class="xref any py py-class docutils literal notranslate"><span class="pre">IntegratorFunction</span></code></a> Function, this method
< effectively begins the function’s accumulation over again at the specified value, and may update related
< values on the component, depending on the component type.  Otherwise, it simply reassigns the Component’s
< value based on its default_variable.</p>
---
> <span class="sig-name descname"><span class="pre">reset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">include_unspecified_nodes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clear_results</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</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">NotImplemented</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.compositions.composition.Composition.reset" title="Permalink to this definition">¶</a></dt>
> <dd><p>Reset all stateful functions in the Composition to their initial values.</p>
> <p>If <strong>values</strong> is provided, the <a class="reference internal" href="StatefulFunction.html#psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value" title="psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">previous_value</span></code></a> of the corresponding
> <a class="reference internal" href="StatefulFunction.html"><span class="doc">stateful functions</span></a> are set to the values specified. If a value is not provided for a
> given node, the <a class="reference internal" href="StatefulFunction.html#psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value" title="psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.previous_value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">previous_value</span></code></a> is set to the value of its <a class="reference internal" href="StatefulFunction.html#psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.initializer" title="psyneulink.core.components.functions.stateful.statefulfunction.StatefulFunction.initializer"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">initializer</span></code></a>.</p>
> <p>If <strong>include_unspecified_nodes</strong> is False, then all nodes must have corresponding reset values.
> The <code class="xref any docutils literal notranslate"><span class="pre">DEFAULT</span></code> keyword can be used in lieu of a numerical value to reset a node’s value to its default.</p>
> <p>If <strong>clear_results</strong> is True, the <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 is set to an empty list.</p>
5429,5434c5432,5438
< <dd><p>Initializes the values of nodes within cycles. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is True and a value is
< provided for a given node, the node will be initialized to that value. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is
< True and a value is not provided, the node will be initialized to its default value. If
< <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is False, then all nodes must have corresponding initialization values. The
< <code class="xref any docutils literal notranslate"><span class="pre">DEFAULT</span></code> keyword can be used in lieu of a numerical value to reset a node’s value to its default.</p>
< <p>If a context is not provided, the most recent context under which the Composition has executed will be used.</p>
---
> <dd><p>Initialize the values of nodes within cycles.
> If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is True and a value is provided for a given node, the node is initialized to
> that value. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is  True and a value is not provided, the node is initialized to
> its default value. If <code class="xref any docutils literal notranslate"><span class="pre">include_unspecified_nodes</span></code> is False, then all nodes must have corresponding
> initialization values. The <code class="xref any docutils literal notranslate"><span class="pre">DEFAULT</span></code> keyword can be used in lieu of a numerical value to reset a node’s value
> to its default.</p>
> <p>If a context is not provided, the most recent context under which the Composition has executed is used.</p>
5438,5439c5442,5443
< <li><p><strong>values</strong> (<em>Dict { Node: Node Value }</em>) – A dictionary contaning key-value pairs of Nodes and initialization values. Nodes within cycles that are
< not included in this dict will be initialized to their default values.</p></li>
---
> <li><p><strong>values</strong> (<em>Dict { Node: Node Value }</em>) – A dictionary containing key-value pairs of Nodes and initialization values. Nodes within cycles that are
> not included in this dict are initialized to their default values.</p></li>
5442c5446
< <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context" title="psyneulink.core.globals.context.Context"><em>Context</em></a>) – The context under which the nodes should be initialized. context will be set to
---
> <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context" title="psyneulink.core.globals.context.Context"><em>Context</em></a>) – The context under which the nodes should be initialized. context are set to
5706c5710
< input that is constant across executions).  Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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>,
---
> input that is constant across executions). Such a node can also be assigned as an <a class="reference internal" href="#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> and/or <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 docu
...

See CI logs for the full diff.

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.

4 participants