Releases: PrincetonUniversity/PsyNeuLink
v0.8.2.4
v0.8.2.4
v0.8.2.3
v0.8.2.3
v0.8.2.2
v0.8.2.2
v0.8.2.1
v0.8.2.1
v0.8.2.0
v0.8.2.0
v0.8.0.0: Merge pull request #1576 from PrincetonUniversity/devel
-
Compilation
• Added support for the following scheduler conditions in Compiled mode: Not, WhenFinished, WhenFinishedAll, WhenFinishedAny, AfterNCalls, AtNCalls, BeforeNCalls
• Added support for the DDM is_finished condition -
Composition
• Added Mechanisms property that returns a MechanismList containing all mechanisms in a Composition
• Added pathways attribute that stores the set of all Pathway instances associated with a Composition
• Added feedback_projections property that lists Projections assigned as feedback
• Added pathways argument to class constructor, allowing user to specify Pathways to be added to the Composition during initialization
• Instances of new Pathway class can now be used to add nodes to a composition with the following methods: add_pathway, add_backpropagation_learning_pathway, add_linear_learning_pathway, add_linear_processing_pathway, add_reinforcement_learning_pathway, and add_td_learning_pathway. Previously, these methods required lists of nodes (which are still allowed as well).
• output_values property now returns the values of the OutputPorts of a Composition in the most recent context instead of the context with the None execution id
• Added the runtime_params argument to Composition.run, allowing users to specify a set of Composition parameters to use for that specific call to run
• Users can now pass None or {} as the inputs argument to Composition.run or Composition.execute. When doing so, the Composition will use its input nodes’ default variables as inputs
• If input or target mechanisms of Compositions have input or output labels associated with them, then these labels can be used in place of specifying numerical values for inputs and targets, respectively, in a Composition’s input and target specifications
• Renamed the following (item types in parentheses):
◦ (Method) Composition.reinitialize -> Composition.reset
◦ (Method) Mechanism.reinitialize -> Mechanism.reset
◦ (Attribute) Mechanism.reinitialize_when -> Mechanism.reset_stateful_function_when
◦ (Argument of Composition.run) reinitialize_nodes_when -> reset_stateful_functions_when
◦ (Argument of Composition.run) reinitialize_values -> reset_stateful_functions_to
• The reset_stateful_functions_when argument of Composition.run can now accept a dict of {Node:Condition} pairs as its argument -
Control
• When a Composition without a controller is added as a node to a Composition with a controller, and the inner Composition has nodes with parameters that have Control specifications, the outer Composition’s controller will use the Control specifications to create projections to those nodes’ parameters. -
Execution Graph
• Previously, the algorithm used for flattening cyclic compositions traversed the graph and flattened cycles as they were encountered. Now, the largest cycles present within compositions are prioritized for flattening. This may change the results of Compositions containing certain types of cyclic structures (see version 0.7.5.4 for last release with previous cycle-flattening algorithm) -
Learning
• The API for learning in Standard PsyNeuLink Compositions has changed. Previously, methods that added learning pathways to standard Compositions returned a target Mechanism that needed to be maintained by the user or otherwise retrieved in order to call the Composition.learn method. With the addition of the Pathway class (detailed above), these methods now return the instantiated Pathway instead of the target Mechanism. Because the set of all Pathways belonging to a Composition are stored on the Composition instance as an attribute, this frees the user of some of the burden of maintaining the target Mechanism instance (see version 0.7.5.4 for last release with previous API) -
Process
• The Process class has been removed entirely from the codebase (see version 0.7.5.4 for last release including Process) -
Pathway
• implemented the Pathway class, which is used to represent a series of Nodes and Projections connected linearly within a Composition. This change interacts with learning in ways that change the API, as specified below (see version 0.7.5.4 for last release with previous API) -
System
• The System class has been removed entirely from the codebase (see version 0.7.5.4 for last release including System) -
Misc
• Various bugfixes, improvements to documentation, internal refactoring, etc.
• All remaining tests usingSystem
andProcess
have been converted to useComposition
or removed
v0.7.1.1: Merge pull request #1399 from PrincetonUniversity/devel
- Function
- Fixed a bug that caused all copies of a function with a random state to produce the same random sequence on execution.
- Tests
- Rewrote several tests to use Composition instead of System/Process.
- Deleted tests made redundant by deprecation of System/Process (because equivalent tests using Composition already exist).
- Docs
- Switched to a new theme for docs
- Mechanism
- ProcessingMechanism
- MAX_VAL and MAX_ABS_VAL output ports now return scalars rather than OneHot values
- MAX_ONE_HOT and MAX_ABS_ONE_HOT added to standard output ports
- TransferMechanism
- Added COMBINE to standard output ports
- DDM
- Removed DDM_OUTPUT; replaced with DDM.standard_output_ports, i.e. instead of instantiating pnl.DDM_OUTPUT.<OUTPUT_PORT_NAME>, you can now use pnl.<OUTPUT_PORT_NAME>
- ContrastiveHebbianMechanism
- Fixed bug in which target_size=0 caused crash
- ProcessingMechanism
v0.7.0.0: Merge pull request #1361 from PrincetonUniversity/devel
- AutodiffComposition
- Greatly improved execution speed of AutodiffCompositions running in compiled mode. Benchmarks show speeds up to 4x as fast as the equivalent models implemented in PyTorch
- By default, AutodiffCompositions now use the MSE loss function during Backpropagation
- Added SSE as an option for Backprop loss function
- Composition
- By default, learning enabled Compositions now use the MSE loss function during Backpropagation
- Added SSE as an option for Backprop loss function
- Function
- Added ParameterEstimationFunction, an OptimizationFunction that uses likelihood free inference to estimate values of parameters for a composition so that it best matches some provided ground truth data
- Modulation
- Simplified modulation such that it is now handled entirely by two classes: 1) ControlMechanism, which modulates Mechanisms and 2) LearningMechanism, which modulates projections
- Utilities
- Added functionality for exporting PsyNeuLink models as JSON structures for integration with external packages/libraries
- States (Ports)
- PsyNeuLink States (e.g. InputState, OutputState) have been renamed to Ports (InputPort, OutputPort)
- Documentation
- Figures updated to reflect change in name of State to Port
v0.6.0.0
-
Component
- Parameters now have internal get and set methods
- All Components now take kwargs. These are passed all the way through the inheritance hierarchy. Exceptions are raised on illegal kwargs during instantiation of Component class
-
Condition
- AtTrialStart added as condition
-
Composition
- Node roles can now be specified when nodes are added to a Composition. This is done in the add_node method by passing a tuple in format (node, [required_roles]) (#1205)
- Users can now set scheduler_processing
- Added add_backpropgation_learning_pathway method that supports multilayer backpropagation learning, and can be combined to generate any pattern of feedforward networks.
- Learning components can now be shown by show_graph using show_learning argument.
- Parameters specified for control in the constructor of a Mechanism are now assigned ControlSignals on the controller of a Composition when the Mechanism is assigned to that Composition
- If a ControlMechanism is included in add_linear_processing_pathway, and neither the objective_mechanism nor monitor_for_control arguments of its constructor was specified, then it will receive projections to it in the same way as any other Mechanism.
- ControlProjections are now assigned as feedback by default if they form a loop.
- Controller now included in Composition.log (#1227)
- Execution id, execution context, and context now consolidated into a single Context class (#1300)
- show_graph: now displays Mechanisms that send a feedback projection in their own shape (septagon by default).
- show_graph: can now generate an animated gif of Composition execution (#1231)
- show_graph: added show_cim option to show Composition CIMs
- show_graph: ModulatoryProjections now use a distinct arrowhead (square by default)
- retain_old_simulation_data added as parameter
- Nodes with a reinitialize_when condition that is satisfied on current trial now reinitialize (#1250)
- Add_back_propagation_pathway now implemented for Compositions (#1260)
- Modulation of nested nodes implemented through the use of Parameter CIMs (#1269)
- Can now specify a ControlMechanism to be used as the controller for a Composition in the Composition’s constructor (#1304)
-
AutodiffComposition
- If learning_enabled is False but inputs are provided in format for learning (i.e. with key for targets), the targets are ignored and inputs key of input dict is used as inputs (allows same input_dict to be used for training and testing)
- Feedforward networks can now be run in compiled mode.
-
Function
- Concatenate Function added, allowing users to concatenate items of a variable (#1238)
- Rearrange Function added, allowing users to rearrange items of variable (#1238)
- TransferWithCosts added: has transfer_fct and associated cost functions that are computed based on the result of the transfer_fct
- Added function() method to Function_Base that handles boilerplate operations common to all Functions.
- Renamed method for individual Functions from function() to _function()
- Added _is_identity attribute, which indicates whether, given current parameters, function will return the same value as its variable (used by State: if it returns True during execution, function is skipped and its variable is returned as its result).
-
Scheduler
- Default Condition for nodes is now to run only when all nodes that it is dependent on have run. Previously, default Condition was to always run
-
ModulatoryMechanism
- Can now be assigned ControlSignals and/or GatingSignals
-
ControlMechanism
- Can now be used to modulate any parameter of the function of an InputState or OutputState, in addition (as previously) to ParameterStates
- Instantiation of objective_mechanism is now optional, and must be explicitly specified (either by setting argument = True, an existing ObjectiveMechanism or a constructor for one
-
ControlSignal
- Now uses TransferWithCosts as its default function; cost functions have been removed and replaced by aliases to cost functions of TransferWithCosts
-
State
- Projection keyword in ModulatorySignal constructor changed from projections to modulates (alias added so that if a user instantiates a ModulatorySignal using the projections keyword it will still work)
- In certain situations where it is possible to determine that a projection will not alter the value of its variable, it will not execute its full Function and instead simply pass its variable as its value (see _is_identity Function attribute above)
- Added full_name property that returns <owner.name>[<self.name>] (#1288)
- Renamed update method to _update
-
Documentation
- Basics and Sampler has been rewritten to reference Composition rather than System/Process, and sections added on Control, Learning and UserDefinedFunction
-
Tutorial
- Rewritten to reference Composition rather than System/Process
-
System/Process
- Now deprecated. Will be eliminated from codebase entirely in an upcoming version
-
Misc
- Abstract class check now uses abc module
- Many bug fixes, optimizations, updates to documentation, etc.
- Most instances of “execution_id” and “execution_context” have been replaced with just “context”, which supports the same types of arguments
v0.4.8.0
Mechanisms
- Add ContrastiveHebbianMechanism (but ContrastiveHebbian Function is not yet implemented)
- Add condition attribute; automatically assigned to scheduler of any System to which Mechanism belongs
- Add reinitialize_when Condition on Mechanisms that accumulate
Functions
- Add ReLU (rectified linear transformation) Function
- Distance Function: added MAX_ABS_DIFF metric
Compositions
-
Add pre-alpha/incomplete Composition
- intended to be more flexible than and eventually replace System/Process
-
System
- Add runtime parameters to Run
- Alternative parameter values that are used when their Condition is True
- show_graph: added show_process option to organize by Processes
- Add runtime parameters to Run
-
Process
- Add warning for (and ignore) duplicate projection specification
Models
- Add PCTC (Kalanthroff et al., 2018)
- Add Stroop GRAIN (Cohen & Huston, 1994)
- Add Conflict Monitoring and Cognitive Control (Botvinick et al., 2001)
Scheduling
- Add Time-based Conditions for TimeScale.TIME_STEP
Testing
- Add testing on Travis (OS X, Linux)
- Add testing on Appveyor (Windows)
- Add coverage testing (pytest-cov, Coveralls)
Misc
- Add support for python3.7
- Many assorted bug fixes and improvements (see commit log for full list)
- Assorted documentation improvements