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

tests: Sanitize PEC tests #2688

Merged
merged 4 commits into from
Jun 2, 2023
Merged

tests: Sanitize PEC tests #2688

merged 4 commits into from
Jun 2, 2023

Conversation

jvesely
Copy link
Collaborator

@jvesely jvesely commented Jun 2, 2023

Use param id instead of fake parameter.
Drop redundant return statements.
Use full precision expected result.
Skip on CUDA.

…fake parameter

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
pytest.skip ends test execution

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
…ult instead of changing tolerance

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Does not work. All evaluations return the same values.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
@jvesely jvesely added the tests Test changes label Jun 2, 2023
@jvesely
Copy link
Collaborator Author

jvesely commented Jun 2, 2023

cc @davidt0x

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

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

diff -r docs-base/AutodiffComposition.html docs-head/AutodiffComposition.html
370c370
< <li><p>the <a class="reference internal" href="AutoAssociativeProjection.html#psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection.matrix" title="psyneulink.library.components.projections.pathway.autoassociativeprojection.AutoAssociativeProjection.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter of Projections</p></li>
---
> <li><p>the <a class="reference internal" href="RecurrentTransferMechanism.html#psyneulink.library.components.mechanisms.processing.transfer.recurrenttransfermechanism.RecurrentTransferMechanism.matrix" title="psyneulink.library.components.mechanisms.processing.transfer.recurrenttransfermechanism.RecurrentTransferMechanism.matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">matrix</span></code></a> parameter of Projections</p></li>
602c602
< for each <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> Node is used as its input (see <a class="reference internal" href="Composition.html#composition-execution-inputs"><span class="std std-ref">Input Formats</span></a> for
---
> for each <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.INPUT" title="psyneulink.core.compositions.pathway.PathwayRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> Node is used as its input (see <a class="reference internal" href="Composition.html#composition-execution-inputs"><span class="std std-ref">Input Formats</span></a> for
611c611
< <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context.execution_id" title="psyneulink.core.globals.context.Context.execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">execution_id</span></code></a> : default <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.default_execution_id" title="psyneulink.core.compositions.composition.Composition.default_execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_execution_id</span></code></a>) – <a class="reference internal" href="Composition.html#composition-execution-context"><span class="std std-ref">execution context</span></a> in which the <a class="reference internal" href="Composition.html"><span class="doc">Composition</span></a> will be executed.</p></li>
---
> <li><p><strong>context</strong> (<a class="reference internal" href="Context.html#psyneulink.core.globals.context.Context.execution_id" title="psyneulink.core.globals.context.Context.execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">execution_id</span></code></a> : default <a class="reference internal" href="Scheduler.html#psyneulink.core.scheduling.scheduler.Scheduler.default_execution_id" title="psyneulink.core.scheduling.scheduler.Scheduler.default_execution_id"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">default_execution_id</span></code></a>) – <a class="reference internal" href="Composition.html#composition-execution-context"><span class="std std-ref">execution context</span></a> in which the <a class="reference internal" href="Composition.html"><span class="doc">Composition</span></a> will be executed.</p></li>
diff -r docs-base/BasicsAndPrimer.html docs-head/BasicsAndPrimer.html
301,302c301,302
< Input Mechanism for the Composition is colored green (to designate it is an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> node), and its output
< Mechanism is colored Red (to designate it at a <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> node).</span><a class="headerlink" href="#id3" title="Permalink to this image">¶</a></p>
---
> Input Mechanism for the Composition is colored green (to designate it is an <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.INPUT" title="psyneulink.core.compositions.pathway.PathwayRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a> node), and its output
> Mechanism is colored Red (to designate it at a <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.OUTPUT" title="psyneulink.core.compositions.pathway.PathwayRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> node).</span><a class="headerlink" href="#id3" title="Permalink to this image">¶</a></p>
407c407
< method.  Inputs are specified in a dictionary, with one entry for each of the Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.INPUT" title="psyneulink.core.compositions.composition.NodeRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a>
---
> method.  Inputs are specified in a dictionary, with one entry for each of the Composition’s <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.INPUT" title="psyneulink.core.compositions.pathway.PathwayRole.INPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">INPUT</span></code></a>
424,425c424,425
< <p>When a Composition is run, its <a class="reference internal" href="Composition.html#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 stores the values of its <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Mechanisms
< at the end of each <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">trial</span></code></a>. In this case, the <a class="reference internal" href="DDM.html"><span class="doc">DDM</span></a> Mechanism is the only <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Mechanism, and it
---
> <p>When a Composition is run, its <a class="reference internal" href="Composition.html#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 stores the values of its <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.OUTPUT" title="psyneulink.core.compositions.pathway.PathwayRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Mechanisms
> at the end of each <a class="reference internal" href="Time.html#psyneulink.core.scheduling.time.TimeScale.TRIAL" title="psyneulink.core.scheduling.time.TimeScale.TRIAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">trial</span></code></a>. In this case, the <a class="reference internal" href="DDM.html"><span class="doc">DDM</span></a> Mechanism is the only <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.OUTPUT" title="psyneulink.core.compositions.pathway.PathwayRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Mechanism, and it
461c461
< Mechanism is the last (<a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.TERMINAL" title="psyneulink.core.compositions.composition.NodeRole.TERMINAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TERMINAL</span></code></a>) Mechanism of the Composition, it is also its <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Mechanism.  Therefore, its
---
> Mechanism is the last (<a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.TERMINAL" title="psyneulink.core.compositions.pathway.PathwayRole.TERMINAL"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">TERMINAL</span></code></a>) Mechanism of the Composition, it is also its <a class="reference internal" href="Pathway.html#psyneulink.core.compositions.pathway.PathwayRole.OUTPUT" title="psyneulink.core.compositions.pathway.PathwayRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Mechanism.  Therefore, its
diff -r docs-base/BotvinickConflictMonitoringModel.html docs-head/BotvinickConflictMonitoringModel.html
271c271
< units to 1.0 for a given trial. Conflict is computed on the <a class="reference internal" href="ComparatorMechanism.html#psyneulink.library.components.mechanisms.processing.objective.comparatormechanism.ComparatorMechanism.output_port" title="psyneulink.library.components.mechanisms.processing.objective.comparatormechanism.ComparatorMechanism.output_port"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_port</span></code></a> of the <em>RESPONSE LAYER</em>. The figure plots
---
> units to 1.0 for a given trial. Conflict is computed on the <a class="reference internal" href="ObjectiveMechanism.html#psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.output_port" title="psyneulink.core.components.mechanisms.processing.objectivemechanism.ObjectiveMechanism.output_port"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_port</span></code></a> of the <em>RESPONSE LAYER</em>. The figure plots
273c273
< The <a class="reference internal" href="Component.html#psyneulink.core.components.component.Component.log" title="psyneulink.core.components.component.Component.log"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">log</span></code></a> function is used to record the output values of <em>RESPONSE LAYER</em>. These values are used to produce
---
> The <a class="reference internal" href="Parameters.html#psyneulink.core.globals.parameters.Parameter.log" title="psyneulink.core.globals.parameters.Parameter.log"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">log</span></code></a> function is used to record the output values of <em>RESPONSE LAYER</em>. These values are used to produce
diff -r docs-base/Cohen_HustonModel.html docs-head/Cohen_HustonModel.html
291,292c291,292
< <code class="xref any docutils literal notranslate"><span class="pre">termination_processing</span></code> parameter in the <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.run" title="psyneulink.core.compositions.composition.Composition.run"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">run</span></code></a> command.</p>
< <p>The <a class="reference internal" href="Component.html#psyneulink.core.components.component.Component.log" title="psyneulink.core.components.component.Component.log"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">log</span></code></a> function is used to record the output values of the <em>RESPONSE LAYER</em>. The cyles until a threshold is reached
---
> <code class="xref any docutils literal notranslate"><span class="pre">termination_processing</span></code> parameter in the <a class="reference internal" href="Scheduler.html#psyneulink.core.scheduling.scheduler.Scheduler.run" title="psyneulink.core.scheduling.scheduler.Scheduler.run"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">run</span></code></a> command.</p>
> <p>The <a class="reference internal" href="Parameters.html#psyneulink.core.globals.parameters.Parameter.log" title="psyneulink.core.globals.parameters.Parameter.log"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">log</span></code></a> function is used to record the output values of the <em>RESPONSE LAYER</em>. The cyles until a threshold is reached
diff -r docs-base/Compilation.html docs-head/Compilation.html
211c211
< <p>The PsyNeuLink runtime compiler works in several steps when invoked via <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.run" title="psyneulink.core.compositions.composition.Composition.run"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">run</span></code></a> or <a class="reference internal" href="AutodiffComposition.html#psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.execute" title="psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.execute"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">execute</span></code></a>:
---
> <p>The PsyNeuLink runtime compiler works in several steps when invoked via <a class="reference internal" href="Scheduler.html#psyneulink.core.scheduling.scheduler.Scheduler.run" title="psyneulink.core.scheduling.scheduler.Scheduler.run"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">run</span></code></a> or <a class="reference internal" href="AutodiffComposition.html#psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.execute" title="psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.execute"><code class="xref any py py-meth docutils literal notranslate"><span class="pre">execute</span></code></a>:
diff -r docs-base/Component.html docs-head/Component.html
755c755
< <dd class="field-odd"><p><a class="reference internal" href="AutodiffComposition.html#psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.Parameters" title="psyneulink.library.compositions.autodiffcomposition.AutodiffComposition.Parameters">Parameters</a></p>
---
> <dd class="field-odd"><p><a class="reference internal" href="RegressionCFA.html#psyneulink.library.compositions.regressioncfa.RegressionCFA.Parameters" title="psyneulink.library.compositions.regressioncfa.RegressionCFA.Parameters">Parameters</a></p>
diff -r docs-base/Composition.html docs-head/Composition.html
595c595
< <p>For example, by default, the <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> Nodes of a Composition are assigned as its <a class="reference internal" href="#psyneulink.core.comp
...

See CI logs for the full diff.

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

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

No differences!

...

See CI logs for the full diff.

@jvesely
Copy link
Collaborator Author

jvesely commented Jun 2, 2023

The first report of documentation differences is caused by ambiguous references, e.g. "matrix" can refer to several different "matrix" parameters. Without selecting a specific one, Sphinx picks an arbitrary one.

@jvesely jvesely merged commit 686ea8d into PrincetonUniversity:devel Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant