-
Notifications
You must be signed in to change notification settings - Fork 32
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
Linear combination fix #734
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixed bug where input and output states of processing mechanisms weren't being set
Fixed bugs with LinearCombination options for 'scale' and 'offset' Added tests for scale and offset
jvesely
added a commit
that referenced
this pull request
Apr 1, 2018
Conflicts: psyneulink/components/mechanisms/mechanism.py 5f67def ("Feat/context/time (#739)") Added new, commented, code around self._execute. Keep the upstream code and adjust indentation. tests/functions/test_combination.py daebb62 ("Linear combination fix (#734)") Fixed the benchmark group name which caused conflicts with the same local fix and the addition of compiled testing Keep the new name and bin_execute functionality
kmantel
added a commit
that referenced
this pull request
Apr 5, 2018
* devel: Feat/mechanism/input target label dicts (#751) Scheduling: fix bug where termination conditions persisted across calls to run tests,function/LinearCombination: Add tests with absent parameters test,function/LinearCombination: Rename second test function to prevent overwriting results • Context (#746) Refactor/context/deprecate init status (#745) Refactor/context/structured (#744) Fix/function/stability (#743) • IntegratorMechanism (#742) Feat/context/time (#740) Feat/context/time (#739) Image Fix (#738) finally fixed image (#737) Image Fix (#736) Example Fix (#735) Linear combination fix (#734) Feat/component/execution count (#733) jvesely/linear_combination_function_refactor (#732) Refactor/project/context rev 2 (#731) Refactor/system/show graph structure options (#730) • System (#729) Feat/mechanism/show structure (#728) Feat/mechanism/show mechanism (#727) jvesely/linear_combination (#724) creating a property for TransferMechanism's integrator_mode so that the mechanism can switch integrator mode on and off Fix/function/udf examples (#722) • Function (#717) Refactor/function/udf (#716) Refactor/mechanism and output state/mech params dict added (#715) Docs/output state/clean up (#714) Clean up/function/softmax one hot (#713) Name/project/replace assign index calculate (#711) Fix/controlmechanism/assign as controller jdc (#705) Feat/function/one hot cleanup (#704) Feat/function/one hot (#703) adding a pytest for the clear_log method updating output of nparray_dictionary when there are no entries from None to an empty OrderedDict Tests/llvm devel sync (#684) removing show graph pdfs from tests folder revising the show_graph pytests to call '_get_label' as a proxy for whether show_graph with dimensions is working moving _get_label helper function outside of show_graph method, so that it can be accessed on its own fixing bug in show_graph(show_dimensions=True) by taking np.atleast_1d of output_state.value • LearningProjection docstring rev (to include error_function) Feat/process/learning objective mech (#698) Feat/ddm/selected input array (#697) Feat/ddm/selected input array (#695) user_params and function_params now look at parameter state values (rather than param base values), and are updated whenever mechanisms update their parameter states adding pytests that call show graph after creating various types of systems -- may refactor these to call the individual methods of show_graph removing system graph pdfs removing show_dimensions=True from call to show_graph in GilzenratModel because it generates an error updating how valus are retrieved from log in Nieuwenhuis model (based on addition of Pass to log) Fix/system/learning ends before terminal (#692) Fix/system/learning ends before terminal (#691) Revert "Merge branch 'master' into fix/system/learning_ends_before_terminal" - • ControlMechanism _instantiate_control_signals: debugged OWNER_VALUE assignment • Scripts/Examples Rumelhart Semantic Network: updated with step function • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • OutputState docstring revs • OutputState docstring revs fixing documentation formatting mistake continuing to add pytests and doc fixes for clip on transfer mechanism types allowing lca to execute function over entire variable, not just first item fixing documentation for clip continuing to add error messages to reinitialize allowing smoothing factor to be an integer (formerly 1.0 and 0.0 were allowed but 1 and 0 were not) removing typecheck on learning mechanism's default_variable adding exception in UDF so that function can be called without params and context correcting error message for initial_value validation on transfer mechanism fixing bug in reinitialize on arrays (needed np.atleast_2d when setting intial_value because it is compared to variable) - • OutputState docstring revs Refactoring of OutputState to support flexible assignment of its variable attribute. Revert "-" Revert "-" Revert "-" - adding pytests for specific reinitialize cases that were not covered, and adding error messages that were missing for some of them - fixing documentation typo: integration_method was mistakenly called integration_method_FHN in docs - - - - - - Reworking Montague, Dayan, and Sejnowski model documentation. - Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state - - - - - - • Utilities - recursive_update(): added non-destructive option that preserves any non-empty entries in destination dict - - - • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() - - - - - - adding pytests for invalid target specifcation to confirm that the proper error messages are generated • OutputState assign function now expects dict as argument - WORKING adding more pytests to confirm that convenience notations and combinations of function and list target specs all run documenting targets and adding some checks to adjust targets: verify that num_targets = num_inputs, and ignore num_targets in the case of function specifications (because a new value is generated on each trial) - - - - • OutputState - implemented assign that takes assign_params_dict as arg Fix/output state/assign backward compat (#676) • OutputState added backward compatibility docstring: document replacement of calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN in progress: refactoring function specification of target spec to be an option within the dictionary specification, rather than on its own • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN Feat/ddm/input state as array (#674) revising documentation for target specification cleaning up a typo in target_spec_parsing (comparator mechanism was referenced where it should have been terminal mechanism) moving call to _check_args in BackProp to before the error matrix is updated in order to avoid a validation bug adding pytests for target spec convenience notations adding run to rumelhart tests (previously only created systems) Merge branches 'clean_up/function_and_system/backprop_and_show_graph' and 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into clean_up/function_and_system/backprop_and_show_graph revising how target input state values are assigned in system's execute_learning adding a simple multilayer learning pytest refactor execute and _execute methods defaults: remove post-hoc conversion of defaults variable Component: don't convert defaults variable on calls to validate a variable parsing: add initial_value parser parsing: add generic argument parser used as default if none specified Component: add method to parse user inputted variable to useable/standard form utilities: handle nonuniform objects better when converting to numpy arrays control: refactor handling of allocation* projections: refactor sender instantiation to avoid directly setting instance default variable clean up input_states handler rename input_states arg parser to handler maint: add comments to separate handler, parsing, and validation methods maint: remove unused PROJECTION_SENDER_VALUE TransferMechanism: use standard form of setting default variable utilities: change number detection to accept any number, not just int and float OutputState: when variable not specified to constructor, pass up another value make self.variable read only (we should not be using it for logic) replace calls to self.variable to proper self.instance_defaults.variable validation: remove extraneous check for ClassDefaults.variable ClassDefaults: make RecurrentTransferMechanism default require 2d variable because it takes an AutoAssociativeProjection that uses a LinearMatrix that requires 1D Distance: fix validation assumption that items of passed variable are iterable ClassDefaults: correct and consolidate utilities: add method to produce a value for length calls when len() fails utilities: add function to determine whether something is iterable Integrators: handle initializer like variable in Components Function: standardize default_variable assignments ProcessingMechanism: use standard assignment of default variable DDM: use standard assignment of default variable ensure default_variable auto sets to dtype float combine handling of default_variable/size to create instance_defaults.variable in Component.__init__ utilities: allow list->array element conversion to typecast internal items validation: fix validate_variable crashes on certain variable types utilities: add helper method to determine if an object contains a single value rename variable->default_variable Clean up/function and system/backprop and show graph (#671) Clean up/learning/misc (#670) Clean up/learning/misc (#669) Clean up/learning/misc (#668) Fix/transfermechanism/noise function (#667) Fix/transfermechanism/clip (#666) Refactor/modulatory signals/linear default function (#665) Refactor/learning/heterovergent (#664) in progress - refactoring adjust_target_dict method to validate all candidate targets and confirm that all mechanisms provided the same number of targets Tests/mechanism/hebbian learning (#663) Docs/function/hebbian (#662) Docs/function/hebbian (#661) updating pytest expected values based on changes to log output adding Pass to log output and updating pytests accordingly Fix/learning/hebbian (#659) swapping all log references to 'simple_time' with the full 'time', and removing old code which handled time stamp duplicates in progress - refactoring target spec/validation to work the same way as input spec/validation renaming object --> component in _adjust_target_dict() updating pytests to match RecurrentTransferMech switch from full matrix to hollow matrix; changed expected output or set auto = 1 to preserve old expected output, depending on type of test setting default matrix of a RecurrentTransferMechanism to a hollow matrix, and updating docs to be clearer about how auto, hetero, and matrix combine/overwrite each other when multiple arguments are specified renaming object --> component in _validate_targets method to avoid shadowing python built-in updating pytest expected results to match increment change in log log pytest for a mechanism that is scheduled to run many times in a row changing increment size on log's time_step workaround temporary workaround for timestep values: incrementing first decimal of timestep revising log tests for new time_step notation temporary workaround for timestep values: incrementing first decimal of timestep revising parse_entries_for_time_values method on log so that it edits the time values in the log items directly, rather than maintaining a separate list of modified time values setting axis=1 on calls to np.sum and np.product in Reduce function and adding tests for this function documentation typos documenting reinitialize on mechanism continuing to add tests and docs for reinitialize fixing bugs that prevented initialize method on system from ever executing, and adding pytests for it now that it works revising outdated TransferMechanism docs for reinitialize continuing to add tests to highlight differences between calling reinitialize on a mechanisms and on a function adding nparray_dictionary to docs and revising nparray to use the same helper methods as nparray_dictionary Time: fix bug where RUN counter would not be incremented on new runs fixing (temporarily) time_step bug in nparray_dictionary; reorganzing nparray_dictionary into methods that can be reused by nparray refactoring log to have a dictionary option and writing tests for it beginning to add a dictionary alternative to the options for whats returned by the log more calls to _dealias_owner_name required in order to create log.nparray fixing bug in log: needed to switch between 'value' and mechanism name in several loops in order to assemble log.nparray - Feat/rl/for mads (#652) Feat/rl/for mads (#651) adding more pytests for reinitialize and fixing reinitialize bugs; beginning to update documentation adding pytests for reinitializing at both function and mechanism level; cleaning up mistakes in reinitialize() methods along the way Merge branch 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/Projection/Context_devel adding a reinitialize method on mechanisms, which calls reinitialize on its function or integrator_function, then updates the mechanism's value and output states beginning to refactor reinitialize as a method on integrator functions Removed Print Statements (#650) cleaning up documentation to match how LinearMatrix works in all cases typo in linear matrix function validation simplifying non-projection branch of validation on LinearMatrix function and adding more pytests default_variable: let argument override input_states variable spec if compatible adding pytests for possible combinations of variable and matrix specifications for LinearMatrix as a function of a mechanism adding validation comparing matrix to variable when LinearMatrix function is called by a mechanism; creating square full connectivity matrix that matches variable when matrix is not specified tutorial: reenable graph drawing; requires graphviz package tutorial: clear outputs Lena Program 1 Bugfix (#648) Hebbian learning fix (#647) User defined function updates (#646) adding working version of LinearMatrix function pytest (only works because default_variable is specified on both the mechanism and the function) fix input_states argparsing to not be dependent on default_variable or size args tests: ensure leabra tests get skipped if module is not available splitting linear matrix function's validation into two branches because matrix is handled differently when the function is called by a projection vs a receiver docstring wording change Docs/models/title changes (#645) Docs/nieuwenhuis/edits (#644) adding pytest for ProcessingMechanism with LinearMatrix function to begin debugging why this fn only works in Projections removing unrestrictedtransfermechanism file because this mechanism is now called ProcessingMechanism and does not need its own file adding parameter state docs examples back in with doctest SKIP revising proccessing mechanism docs because it is not an executable mechanism (not just an ABC) renaming UnrestrictedProcessingMechanism --> ProcessingMechanism and moving code into processingmechanism.py (which formerly only contained ProcessingMechanism_Base Leabra Update (#642) DDM: update is_finished to work on functions with any dimensional variable skipping transfer mechanism doc tests skipping transfer mechanism doc tests minor documentation changes -typos and formatting mistakes reorganizing integrator mechanism pytests for reinitialize overwriting AGTUtilityIntegrator's reinitialize property - requires custom reinitialization of short term and long term utility overwriting FHNIntegrator's reinitialize property - requires custom reinitialization of v, w, time, value overwriting reinitialize property on DriftDiffusion Integrator so that time can also be reset documenting reinitialize on all Integrator functions and fixing a typo in transfer mechanism docs (initial_value --> initializer) continuing to add docs and examples for reinitialize, and cleaning up TransferMechanism docs along the way fixing tutorial indexing bug refactoring is_finished as a property so that it is always up to date, even when values change in between executions (i.e. if threshold was crossed and then reinitialize was used) fixing bug in transfer mechanism documention examples (np.array typo) renaming reset_intializer --> reinitialize adding unrestricted mechanism pytests to confirm that mechanism can be constructed and executed with any function -- identified two exceptions (linear matrix and back prop) adding a new mechanism that has no restrictions on which functions can be used commenting out show graph lines in tutorial for now because graphviz is not imported on testing server adding updated version of tutorial from Justin Defaults*: fix class structure addressing bugs revising transfer mechanism documentation -- 'creating' section commenting out show_graph in EVC gratton pytest so that this line does not run on Jenkins adding TransferMechanism pytests to verify previous_value persists over multiple runs/executions AND previous_value resets whenever reset_initializer is used edited NieuwenhuisModel docs tutorial: remove old version - new version is in tutorial/ dir tutorial: support execution on mybinder.org tutorial: support execution on mybinder.org tutorial: remove old version - new version is in tutorial/ dir • Niewenhuis model - docstring edits - adding integrator_mode and integrator_function attr documentation for all transfer mechanism types revising outdated documentation for transfer mechanism noise fixed bug in plotting Nieuwenhuis Model updated Nieuwenhuis documentation adding attrs that were missing from LCA mechanism docs and revising related documentation Scripts: clean up Functions: add UniformToNormalDist to top-level psyneulink module; update docs revising explanation of user_params revising explanation of user_params revising parameter state documentation adding Markus' Nieuwenhuis documentation, plus figures and some .rst formatting Functions: replace internal calls to find owner's name with a property Component: make string version of *defaults classes be sorted removing parameter state example from file completely (tried commenting it out originally) removing parameter states example from documentation because it may be the reason parameter state tests are failing renaming 'Core Configurable Attributes' --> 'Core Structural Attributes' in Component documentation Refactor/system/controller (#627) Fix/controlmechanism/assign as controller (#625) • Log (#624) fixing typo in doctest (parameter state values) adding a docs example which walks through how a mechanism parameter and a function parameter and their mod_ versions change in value BogaczEtAl: use better numpy method for floating point warning handling utilities: update compatibility checker to terminate earlier in some cases updating modulation-related documentation to include mod_param and be more precise about what is updated by modulation (the parameter value used by a function changes, but the corresponding function attr does not change b/c it is the base value) adding documentation for mod_param allowing user to pass value into mod_param setter (even though setting is not allowed) in order to produce a more informative error message) commenting out noise and smoothing factor properties in transfer mechanism because these replace the default properties, causing unexpected behavior adding pytest to verify correct error message when user tries to set to mod_param_name adding pytest to track changes in attr, _attr, mod_param_name, and userparams[param_name] values of Transfer Mechanism's configurable params when (1) param values are updated (2) mechanism is executed adding an exception to make_mod_param as a temporary fix for function-specific mod_param properties that stay on mechanism class when function changes fixing typo in AGTUtilityIntegrator cleaning up function.py and verifying that self.get_current_function_param is used in all functions (skipped learning functions for now) Fix/controlmechanism/assign as controller (#620) Fix/controlmechanism/assign as controller (#619) cleaning up recurrent transfer mechanism pytests and fixing bugs in asserts updating matrix setter to also set the projection's matrix parameter state's function's previous value uncommenting auto and hetero properties from auto associative projection so that setting auto and hetero directly on the projections works adding auto and hetero properties to recurrent transfer mechanism. Auto, hetero, and matrix setters now all update recurrent_projection's matrix parameter state's function's previous_value Fix/controlmechanism/assign as controller (#618) executing projection individually in tranfer mechanism's matrix-change pytest adding a matrix-change pytest for a mapping projection between two transfer mechanisms in order to isolate the matrix bug from auto/hetero properties Defaults: clean up method organization fixing shape typo in gilzenrat script fixing overly strict rate param validation that caused bug in cases where mechanism looks up parameter state value refactoring transfer mechanism to use get_current_mechanism_param() refactoring LCA to use get_current_mechanism_param() refactoring kwta's _kwta_scale() to rely on get_current_mechanism_param() adding get_current_mechanism_param method on mechanism base to try to look up parameter state value remove now-unused time_scale param from many objects (not in scheduling where it's still used) log doctests: ignore tests with inconsistent whitespacing removing auto and hetero assignments from params dict in recurrent transfer mechansim removing unnecessary auto and hetero code in auto associative projection to clean up the relationship between the recurrent projection, its mechanism, and the auto, hetero, and matrix, attrs requiring _kwta_scale method to use k_value parameter state value when available commenting out calssPreferences in transfer mechanism because they cause bugs in KWTA when classPreferences try to update removing attempt to look up recurrent projection's matrix in matrix getter (because the recurrent projection looks up its owner's matrix) refactoring matrix getter on auto associative projection to look up owner's matrix whenever possible directly updating auto and hetero attrs at the same time that their parameter states are created in the auto specified, hetero = None and hetero specified, auto = None cases beginning to refactor auto/hetero/matrix handling to fit with new parameter state value and make_property changes; beginning by removing obsolete code in recurrent transfer mechanism removed CentralClock from MontagueDayanSejnowski96.py fixed typo in owner attribute description Fix/function/validate params (#616) Defaults: set up structure to allow proper aliasing for *Defaults classes - Renamed MontagueModel.py to MontagueDayanSejnowski96.py - Correct RST formatting in PredictionErrorMechanism docs - Added Arguments and Attributes to docs for PredictionErrorMechanism LinearCombination: rework check for division by zero error to be more general default_value: refactor into instance_defaults Component: add metaclass for *Defaults to allow some user convenience functionality Refactor/control signal/update to intensity (#613) Fix/component/intensity and value (#612) Fix/gilzenrat model/prefs bug (#611) updating DDM mechanism to get threshold using get_current_function_param method when it uses threshold to determine decision variable continuing to update how parameters are accessed in pytests (should be mod_ now in many cases) replacing .matrix with .mod_matrix in learning pytests adding a call to super in projection's _instantiate_attributes_after_function so that it calls make_property_mod (on component) Fix/ddm/threshold validation (#610) calling get_current_function_param in the remaining functions and fixing small bugs along the way (missing keyword for 'gamma', np.atleast_2d(rate) in lcaintegrator) moving make_property_mod back to component.py (from parameterstate.py) -- it is now called for all parameter states during _instantiate_attributes_after_function rather than by individual parameter states Docs/td learning/doc fixes (#609) removed show graph call from test_reinforcement resetting test_multilayer from devel and removing matplotlib from test_prediction_error_delta_function specifying smoothing_factor=1.0 on pytests that used to use default smoothing_factor (1.0 --> 0.5) changing smoothing factor (formerly time_constant) default value to 0.5 -- it was confusing to users that the default param value prevented integration renaming 'time_constant' --> 'smoothing_factor' on TransferMechanism types that use AdaptiveIntegrator Fix/log/trial and run (#607) Feat/log/trial and run (#606) Refactor/project/learning vs executing (#605) correcting capitalization cleaning up documentation adding asserts to parameter states pytests in order to start tracking down bug where mod_noise looks up the parameter state value of the last instance created Refactor/mechanism/value in execute 2 (#603) predictionerrormechanism docs: move gilzenrat svg files from build dir to source dir Fix/log/tuple datum value (#601) registry: handle case where default-named projection to a duplicate named mechanism would incorrectly detect the projection name as a duplicate finished TD Learning documentation Fix/state/matrix spec and learning (#600) Fix/component preference set/class preferences (#598) Fix/log/set log conditions bug (#596) updating Transfer functions (Linear, Logistic, Exponential) to use get_current_params(KEYWORD) instead of paramsCurrent[KEYWORD] adding get_current_param method which tries to return mod_param and returns param if that doesn't exist -- will eventually be added to all functions, starting here with DriftDiffusionIntegrator Docs/log/hint (#595) updating shape inconsistencies in DriftDiffusionIntegrator / DDM Mechanism related to time and threshold removing special handling of DriftDiffusionIntegrator threshold in variable=array case (correct behavior is ambiguous) docs: add extra sub-version number in version display utilities: enhance method to recursively convert items to np.ndarray, handling hard cases for np.array remove scratch pad and ignore Docs/log/log clean up (#593) Docs/log/log clean up (#592) remove scratch pad Docs/log/log clean up (#591) Names/log/set log conditions (#590) adding pytests to verify that threshold and is_finished work as expected; commenting out tests with DriftDiffusionIntegrator and len(default_variable) > 1 because correct behavior is ambiguous (for now) adding 'threshold' param on DriftDiffusionIntegrator which stops accumulation at the threshold, and updated DDM's is_finished to look at this updating shape of time computation in FHN integrator (was list, now float) updating gilzenrat pytest which was checking _gain and gain to verify modulation to now use gain and mod_gain updating pytests and adding comments to possibly fix shape of ddm time value, which changed from a list to a float after property refactoring add realtime timestamps to Scheduler, for creation time and end of last RUN time change usages of now defunct times attribute of Schedulers to new version updating mod_param_name property creation to happen at the instance level in both cases (formerly created on mechanism classes) unindenting misplaced setting of _param_name attributes Bugfixes (#588) setting _param_name for all param_names that go through _validate_params resolves SOME of the cases where getter looks for _param_name before setter creates an _ attr Feat/log/add entry (#587) Fix/log/log initialization (#586) Feat/log/clean up (#585) Feat/log/clean up (#584) Feat/feat log with time (#583) rename psyneulink.scheduling.timescale -> psyneulink.scheduling.time create and integrate a new Clock class, and several new classes to keep time, used in Scheduler and Conditions adding _param_name to script for better output comparison with older versions (when _ stored the base value) solving bug where _param_name did not exist on TransferMechanism instances, but introduced new bug where last param value that was set is starting param value of next instance remove old Clock/CentralClock debugging make property execution main documentation for PredictionErrorMechanism done adding mod_slope to the current parameter state pytests adding make_property_mod method to parameter states -- executed at the end of _instantiate_parameter_state method and creates a property called mod_param_name on each param that has a parameter state which looks up the current parameter state value limiting make_property's resposibility to validation -- setter runs validation and then sets to _param_name, getter returns _param_name. mod_param_name property will handle getting parameter state value Feat/log/log levels (#580) test beginning to separate make property into two methods added PredictionErrorDeltaFunction and docs for PredictionErrorMechanism & Montague model Refactor/log/entry management (#579) montague models working! Docs/log/docstring update (#578) Add integrator function tests Add transfer function tests Add distance function tests function: test for both 1d and 2d noise setup.cfg: Use warmup if benchmarks are enabled setup.cfg: Disable benchmarks by default pytest: Add benchmarking plugin Fix/log/logged items bug (#577) using UniformToNormalDist pytest as a check of the scipy requirement error message adding documentation for UniformToNormalDist validating uniform-to-normal distribution function (matlab) Docs/log/docstring update (#572) adding gilzenrat figures in _build file adding pytest file for parameter states Name/log/numpy array to nparray (#571) Feat/mechanism/additional props (#570) Feat/log (#569) EVCAuxiliary: replace kwargs function signatures with explicit arguments add docstring explanation for processing and learning termination conditions Feat/log (#568) adding LC Control Mechanism test to verify that it is updating multiplicative param(s) of modulated mechanism(s) properly fix incorrect construction of Process and System in Multitasking example script Feat/log (#565) Feat/log (#564) almost working! add travis config file single source package requirements fixed error message in LinearMatrix adding a pytest for the new uniform --> normal distribution function fixed sample input updating recurrent transfer mechanism and transfer mechanism documentation • State - _validate_variable: removed: if not context: context = kwAssign + ' Base Value' else: context = context + kwAssign + ' Base Value' Fix/component/default naming (#558) remove Scratch Pad clean up DDM examples with verified parameters from matlab skip NavarroAndFuss doctest because build server cannot access matlab update NavarroAndFuss to use the correct version of the MATLAB simulation convert DDM return_value for NavarroAndFuss function to be floats to allow NaN assignment fix bug in using the matlab engine to run a script outside of the current dir adding validation on NormalDist function in the case where some numpy versions throw an error • System (#556) adding new UniformToNormalDist function which allows for a direct comparison of random numbers between python and matlab Feat/system/show graph (#555) adding integration_method to FHNIntegrator docs and refining error message Fix/modulatory specifications (#554) clean imports in function.py commenting out assertions in OU integrator pytests until its equation is validated fixing mistake in implementation of OUIntegrator adding LCAIntegrator docs to function docs page and continuing to touch up typos and incorrect info throughout function docs continuing to add documentation for LC Control Mechanism params adding matlab and psyneulink plot svgs adding pnl and matlab plots plus some additional notes to the Gilzenrat Model page of the documentation fixing typos in FHNIntegrator docs documenting the LCControl mechanism parameters that hand values off to the FHNIntegrator as well as scaling_factor_gain and base_value_gain cleaning up FHNIntegrator docs with tables for explaining parameters and latex equations typos in run (input spec) docs cleanup Scheduler doc examples add parsing handler for Scheduler termination_conditions move static .svg files from docs build directory to source dir update docs to show 0.0.x versions instead of just 0.x (we use the former frequently) fix broken package link for AutoAssociativeMechanism that caused sphinx automodule to fail removing references to 'inhibition' and 'decay' in LCA docs removing gilzenrat transfer mechanism from the repo updating gilzenrat unit tests to use LCA mechanism in place of GilzenratTransferMechanism fix bug where versioneer wasn't available at the correct time in building docs adding a note about the recurrent matrix to LCA docs rewriting gilzenrat model in terms of LCA rather than 'GilzenratTransferMechanism' removing LCA pytest from recurrent transfer pytests file now that LCA has its own tests updating LCA documentation -- removing beta & inhibition, adding leak, competition, and self_excitation.: setting default values for new LCA params adding pytest file for LCA and testing length 1 variable and length 2 variable cases added output_states param to call of PredictionErrorMechanism constructor added default variable param to call to LinearCombination in PredictionErrorMechanism adding 'leak' parameter and renaming 'auto'-->'self_excitation' and 'hetero'-->'competition' on LCA mechanism Refactor/state/doc test bugs (#551) fix bug where invalid escape strings in docstrings would cause failure on python 3.6.x fixing incorrect documentation of LCA (did not reflect new LCAIntegrator function) continuing to clean up Gilzenrat model and its model-specific components -- verifying that all arguments are consistent and correctly documented manually setting outputstate variable size adding params for G and k to LCControl mechanism as a temporary solution for allowing the user to modify the equation that computes gain as a function of w cleaning up gilzenrat script comments and labeling all params from the paper tried manually setting OutputState value for PEM -- didn't work Refactor/state/ parse state specs lots (#550) use versioneer for single-source versioning adding Gilzenrat changes from Markus fixed target size for PredictionErrorMechanism trying to fix tests correct W293 instances fix bug where intra-numpy-array list->array element conversion would fail on 0-d numpy array input updating logistic function and its documentation to match the more standard form, with an optional 'offset' to take the place of original 'bias' param. Updating all pytests that used what was formerly 'bias' and is now 'offset' trying more things to get td learning working clean up leabra demo script clean up leabramechanism add __all__ to leabramechanism and update relevant package rename certain leabra-specific functions to include "leabra" in preparation for adding to top-level namespace remove unnecessary (and oddly expensive) logging in scheduler fix bug where over/underflows in logistic functions would cause the result to be replaced with 0 (often incorrect format and destructive) remove forced error on warnings Leabra script cleaning (#547) cleaned up Matlab scripts & EVC Gratton example script (#546) Docs/project/more docstring fixes (#545) Docs/project/more fixes (#544) Docs/project/fixes (#543) reformat Example scripts to new import style, and clean up setup Scripts/Examples folder with desired scripts remove old/undesired scripts adding input spec figures to run documentation rename _get_matrix to get_matrix Revert "Fix/scripts/cleanup (#539)" commenting out all clip (formerly range) code because it does not work as expected fixing formatting typo in documentation continuing to clean up input specification for (1) heterogenous variables and (2) a limited version of 'sequence' specification Fix/scripts/cleanup (#539) updating documentation example pytests to verify all inpt values against specified input values updating documentation example typos Feat/transfer mechanism/add std output states (#538) refactoring system input state creation to create one system input state (and mapping projection) for each input state of each origin mechanism Feat/transfer mechanism/add std output states (#537) Fix/output states (#536) Refactor/transfer mechanism/mutiple output states (#535) updating transfer mech execute to check the type of its function and call it once or once per input state accordingly, plus Jon's instantiate_output_states reclassifying softmax as a 'NormalizingFunction' instead of a 'TransferFunction' so that we can easily identify transfer mechanism functions that should be executed separately for each input state use pytest fixture for registry reset in tests/naming to ensure it gets called renaming --> on TransferMechanism types in order to not overwrite Python built-in range Refactor/naming (#533) add download link for GilzenratModel.py updating kwta and recurrent transfer mech pytests to match new output shape cleaning up imports so test will run add values(), show(), and nice str/repr methods to InstanceDefaults move name assignment (in registry call) to before input_states arg handling in mechanism Revert "Refactor/mechanism/preprocess variable (#531)" updating transfer mechanism pytests to match new shape of output updating transfer mechanism to call its function separately for each input state (each element of variable); for now, integrator function still only executes once add shell classes to top-level psyneulink namespace correct bug that would cause specifying 3d arrays as default_variable to assign default_variable incorrectly add method to np.array-ify all elements within a list/array continuing to add pytests for input specification - stuck on verifying that the input specification worked via tools (e.g. call_after_trial) available to the user, because non primary input states are getting overwritten as None updating documentation for input specification -- adding tables of inputs on each trial with code snippets Fix/mechanism/ parse arg input states (#532) Increment version to 0.4.0 add more input_state spec tests to handle currently known combinations for setting default_variable Refactor/mechanism/preprocess variable (#531) Refactor/mechanism/preprocess variable (#530) Docs/state and projections/docstring revs (#529) correct bug in _parse_arg_input_states where a non-list argument wouldn't be made into a list before processing change behavior of _parse_state_spec to not populate the state dict with a variable if it's a ClassDefault updating noise validation to compare against entire variable (possibly multiple input states) and updating error messages in pytests to reflect these changes updating 'try_execute_param method to expect 2d variable and return 2d param updating pytests for input specification documentation examples to match the new documentation examples continuing to update docs for inputs to system revising the input specification docs to describe the rules in terms of matching the mechanim's variable - also making the convenience cases clearer removing references to timescale in run and system docs Fixed/state/ parse state spec/projection spec (#528) Refactor/distance metrics (#526) Docs/latex math (#525) Docs/intro materials (#524) continuing to add pytests to test new input specification rules updating some reporting statements to match the new form of inputs (dict) continuing to clean up input specification; running inputs first through a new method called _input_matches_variable which catches some numpy mistakes specific to input validation that slip through iscompatible Logo (#523) make self.name return unnamed .__class__ in case no name was set Docs/input state specs (#522) Fix/input state specs (#521) continuing to add pytests for testing input specifications updating process and system to handle the new execution_inputs dict that they receive from run consolidating and revamping input processing to get rid of any references to , repetitive code. still some clean up to do -- 5 pytests failing Fix/input state specs (#520) Fix/input state specs (#519) beginning to consolidate input validation because we no longer have phases and don't need to handle systems and processes differently -- 22 pytests failing Fix/input state specs (#518) using new EULER option on the LCControlMechanism in GilzenratModel in order to match original model adding validation requiring integration_method to either be RK4 or EULER adding 'integration_method' to LCControlMechanism so that user can switch between euler and rk4 integration for the built-in FHN function fixing some params to match matlab model; made it easier to swtich between high C and low C params switching FHNIntegrator to use euler integration scaling entire noise term by sqrt(dt) rather than scaling the standard deviation of the noise term by sqrt(dt) Naming/registry/default name 0 (#516) beginning to add in an exception which will allow the case where all mechanisms specify one input which is the same shape as their variable (i.e. no outer list for trials) hack mechanism to be able to accept instance_defaults.variable setup via input_states argument still trying to fix inputs cleaning up sytem unit tests to match new input spec (outer set of brackets representing trials required) cleaning up mechanism unit tests to match new input spec (outer set of brackets representing trials required move input_states spec tests in test_transfer_mechanism to new file update current input_state spec tests make test_transfer_mechanism tests use instance_defaults.variable instead of incorrect .variable Docs/state and projection (#515) remove uses of self.variable. (it is vestigial and maintained only for user inspection) rename duplicate transfer mech test to avoid overwrite adding input specification pytests to test_system in order to verify which input spec formats already work and build on this pull from devel Refactor/control and gating signals (#514) Import leabra and run leabra tests only if leabra module is available. Leabra wrapper prototype (#513) Fix/utilities/iscompatible final rev (#512) Fix/utilities/iscompatible (#511) rename System and Process to add _Base suffix in shellclasses.__all__ because of abf3e7e and 6b9e9a4 Clean up/registry/ register category (#508) Refactor/projection/connection specs (#507) Refactor/gating mechanism/ instantiate gating signal (#506) • Projection (#505) updating comments and error messages in _construct_stimulus_sets to reflect changes updating 3 recurrent transfer mech unit tests which used 'sequence format' of input specification for a process to use 'mechanism format' instead Refactor/projection/ instantiate sender (#504) Refactor/state and projection/clean up (#503) commenting out branch of _construct_stimulus_sets which parses inputs by the 'sequence format' rules -- seems safe to move entirely to mechanism format b/c all pytests use 'mechanism format' and new examples using 'sequence format' do not work weird hybrid prediction error mechanism fix typo in ObjectiveMechanism docstring causing weird documentation formatting avoid using module-level Mechanisms in unit tests to avoid possible conflicts Refactor/state and projection/unit tests bug fixes (#502) Refactor/state and projections/unit tests (#501) Refactor/state and projection/names and docs (#500) requiring version 1.4 of toposort moving imports to top of gilzenrat pytests file adding full gilzenrat model to pytests -- no comparison data to assert yet, just verifying that model can run without errors adding pytests that isolate the GilzenratTransferMechanism and moving FHNIntegrator test that recreates figure 2 from gilzenrat paper from integrator mechanism tests --> gilzenrat tests fixing up a few model values in the gilzenrat model -- behavior is not quit right -- and switching number_of_trials back to 1 Optimize registry duplicate naming adding progress statement ('% complete') to gilzenrat script implementing noise on LCAIntegrator and cleaning up unnecessary integrator function code (removing GilzenratIntegrator) replacing GilzenratIntegrator with LCAIntegrator (with rate=-1) in GilzenratTransferMechanism Refactor/state and projection/specification bug fix 2 (#495) Refactored instantiation of States and Projections (#494) updating mechanism pytests to reflect integrator_function shape change and removing extraneous transfer mechanism tests which returned arrays of mixed types indexing into the first element of the transfer mechanism's integrator_function result so that the shape passed to the transfer mechanism's function is the same as if integrator_mode were false add component module to main psyneulink package fold keywords into first level hierarchy, because some keywords aren't defined in Keywords.py and this is confusing skip notebook checkpoints in running notebook tests stop package-level __all__ assignments from accidentally overwriting the __all__ objects they used as bases fixing bug in NormalDist() function which was shifting the mean of the distribution fix link to the tutorial in docs that didn't get changed when tutorial/ directory was created correcting LCAIntegrator function to match the papers (since it represents a rate of change, we need to integrate over timesteps) and relaxing integrator rate param validation which was blocking variables of lengths > 1 Devel (#490) improving initial conditions by making first recurrent projections to recurrent mechanisms make sense given their starting values make Function_Base inherit its paramClassDefaults from its parent class Function instead of Component remove DefaultProcessingMechanism from component/__init__.py because it's an instantiation of a _Base class, and doesn't get used removing and re-adding gilzenrat transfer mechanism because name change did not seem to work updating value of LC control mechanism output before it runs to match initial previous value (had to do this in the gilzenrat script because of other LC control mechanism hacks, but left a placeholer in ControlMechanism for how to implement this more generally for any control mechanism that accumulates) adding a new Integrator function that matches the decision and response layer functions in the Gilzenrat paper, and a new transfer mechanism which calls this integrator before its primary function update README and docs index.rst to new PyPI installation instructions, and tutorial section, reorganize reformat README into .rst format so pypi can format it nicely update short description to match the title line in the long description update setup.cfg for wheel creation and to include license file update setup.py supported Python versions to include only 3.5 and 3.6 (does not work on < 3.4 due to numpy, does not work on 3.4) update setup.py classifier for Apache license add tutorial_requirements.txt mirroring setup.py requirements add requirements.txt mirroring setup.py requirements update setup.py packages add MANIFEST.in remove SOFTWARE ARCHITECTURE and TODO List remove extraneous files add docstrings to __init__.py files (for help command) update tutorial to new easier import style update docs to handle new module/package format update package __init__.py files for simple importing add __all__ lists to modules rename globals/run.py to globals/environment.py to avoid namespace conflict with run method clean up main package __init__.py replace paramClassDefaults PROJECTION_SENDER with OutputState class instead of keyword to prevent error due to failed conversion rework imports to avoid circularities due to packaging make LearningMechanism get its paramClassDefaults from its parent and not Projection_Base remove mechanism factory method remove system factory in favor of just instantiating System class remove process factory in favor of just instantiating Process class switch name of Process and Process_Base switch name of System and System_Base move typecheck for _get_modulated_param inside to avoid circular import remove old pyargs argument for pytest relaxing validation on LCAIntegrator rate param in order to create an LCA example in integrator mode with an array input cleaning up resolving merge conflicts fixing merge conflicts started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism starting TDDelta Function -- very messy 2 of 3 test working integrating td learning cleaning up Function.py for pull request tests working! Q-matrix initialization working; mechanism does not Added Q-learning and SARSA algorithm
kmantel
added a commit
that referenced
this pull request
Apr 5, 2018
* devel: Feat/mechanism/input target label dicts (#751) Scheduling: fix bug where termination conditions persisted across calls to run tests,function/LinearCombination: Add tests with absent parameters test,function/LinearCombination: Rename second test function to prevent overwriting results • Context (#746) Refactor/context/deprecate init status (#745) Refactor/context/structured (#744) Fix/function/stability (#743) • IntegratorMechanism (#742) Feat/context/time (#740) Feat/context/time (#739) Image Fix (#738) finally fixed image (#737) Image Fix (#736) Example Fix (#735) Linear combination fix (#734) Feat/component/execution count (#733) jvesely/linear_combination_function_refactor (#732) Refactor/project/context rev 2 (#731) Refactor/system/show graph structure options (#730) • System (#729) Feat/mechanism/show structure (#728) Feat/mechanism/show mechanism (#727) jvesely/linear_combination (#724) creating a property for TransferMechanism's integrator_mode so that the mechanism can switch integrator mode on and off Fix/function/udf examples (#722) • Function (#717) Refactor/function/udf (#716) Refactor/mechanism and output state/mech params dict added (#715) Docs/output state/clean up (#714) Clean up/function/softmax one hot (#713) Name/project/replace assign index calculate (#711) Fix/controlmechanism/assign as controller jdc (#705) Feat/function/one hot cleanup (#704) Feat/function/one hot (#703) adding a pytest for the clear_log method updating output of nparray_dictionary when there are no entries from None to an empty OrderedDict Tests/llvm devel sync (#684) removing show graph pdfs from tests folder revising the show_graph pytests to call '_get_label' as a proxy for whether show_graph with dimensions is working moving _get_label helper function outside of show_graph method, so that it can be accessed on its own fixing bug in show_graph(show_dimensions=True) by taking np.atleast_1d of output_state.value • LearningProjection docstring rev (to include error_function) Feat/process/learning objective mech (#698) Feat/ddm/selected input array (#697) Feat/ddm/selected input array (#695) user_params and function_params now look at parameter state values (rather than param base values), and are updated whenever mechanisms update their parameter states adding pytests that call show graph after creating various types of systems -- may refactor these to call the individual methods of show_graph removing system graph pdfs removing show_dimensions=True from call to show_graph in GilzenratModel because it generates an error updating how valus are retrieved from log in Nieuwenhuis model (based on addition of Pass to log) Fix/system/learning ends before terminal (#692) Fix/system/learning ends before terminal (#691) Revert "Merge branch 'master' into fix/system/learning_ends_before_terminal" - • ControlMechanism _instantiate_control_signals: debugged OWNER_VALUE assignment • Scripts/Examples Rumelhart Semantic Network: updated with step function • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • OutputState docstring revs • OutputState docstring revs fixing documentation formatting mistake continuing to add pytests and doc fixes for clip on transfer mechanism types allowing lca to execute function over entire variable, not just first item fixing documentation for clip continuing to add error messages to reinitialize allowing smoothing factor to be an integer (formerly 1.0 and 0.0 were allowed but 1 and 0 were not) removing typecheck on learning mechanism's default_variable adding exception in UDF so that function can be called without params and context correcting error message for initial_value validation on transfer mechanism fixing bug in reinitialize on arrays (needed np.atleast_2d when setting intial_value because it is compared to variable) - • OutputState docstring revs Refactoring of OutputState to support flexible assignment of its variable attribute. Revert "-" Revert "-" Revert "-" - adding pytests for specific reinitialize cases that were not covered, and adding error messages that were missing for some of them - fixing documentation typo: integration_method was mistakenly called integration_method_FHN in docs - - - - - - Reworking Montague, Dayan, and Sejnowski model documentation. - Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state - - - - - - • Utilities - recursive_update(): added non-destructive option that preserves any non-empty entries in destination dict - - - • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() - - - - - - adding pytests for invalid target specifcation to confirm that the proper error messages are generated • OutputState assign function now expects dict as argument - WORKING adding more pytests to confirm that convenience notations and combinations of function and list target specs all run documenting targets and adding some checks to adjust targets: verify that num_targets = num_inputs, and ignore num_targets in the case of function specifications (because a new value is generated on each trial) - - - - • OutputState - implemented assign that takes assign_params_dict as arg Fix/output state/assign backward compat (#676) • OutputState added backward compatibility docstring: document replacement of calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN in progress: refactoring function specification of target spec to be an option within the dictionary specification, rather than on its own • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN Feat/ddm/input state as array (#674) revising documentation for target specification cleaning up a typo in target_spec_parsing (comparator mechanism was referenced where it should have been terminal mechanism) moving call to _check_args in BackProp to before the error matrix is updated in order to avoid a validation bug adding pytests for target spec convenience notations adding run to rumelhart tests (previously only created systems) Merge branches 'clean_up/function_and_system/backprop_and_show_graph' and 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into clean_up/function_and_system/backprop_and_show_graph revising how target input state values are assigned in system's execute_learning adding a simple multilayer learning pytest refactor execute and _execute methods defaults: remove post-hoc conversion of defaults variable Component: don't convert defaults variable on calls to validate a variable parsing: add initial_value parser parsing: add generic argument parser used as default if none specified Component: add method to parse user inputted variable to useable/standard form utilities: handle nonuniform objects better when converting to numpy arrays control: refactor handling of allocation* projections: refactor sender instantiation to avoid directly setting instance default variable clean up input_states handler rename input_states arg parser to handler maint: add comments to separate handler, parsing, and validation methods maint: remove unused PROJECTION_SENDER_VALUE TransferMechanism: use standard form of setting default variable utilities: change number detection to accept any number, not just int and float OutputState: when variable not specified to constructor, pass up another value make self.variable read only (we should not be using it for logic) replace calls to self.variable to proper self.instance_defaults.variable validation: remove extraneous check for ClassDefaults.variable ClassDefaults: make RecurrentTransferMechanism default require 2d variable because it takes an AutoAssociativeProjection that uses a LinearMatrix that requires 1D Distance: fix validation assumption that items of passed variable are iterable ClassDefaults: correct and consolidate utilities: add method to produce a value for length calls when len() fails utilities: add function to determine whether something is iterable Integrators: handle initializer like variable in Components Function: standardize default_variable assignments ProcessingMechanism: use standard assignment of default variable DDM: use standard assignment of default variable ensure default_variable auto sets to dtype float combine handling of default_variable/size to create instance_defaults.variable in Component.__init__ utilities: allow list->array element conversion to typecast internal items validation: fix validate_variable crashes on certain variable types utilities: add helper method to determine if an object contains a single value rename variable->default_variable Clean up/function and system/backprop and show graph (#671) Clean up/learning/misc (#670) Clean up/learning/misc (#669) Clean up/learning/misc (#668) Fix/transfermechanism/noise function (#667) Fix/transfermechanism/clip (#666) Refactor/modulatory signals/linear default function (#665) Refactor/learning/heterovergent (#664) in progress - refactoring adjust_target_dict method to validate all candidate targets and confirm that all mechanisms provided the same number of targets Tests/mechanism/hebbian learning (#663) Docs/function/hebbian (#662) Docs/function/hebbian (#661) updating pytest expected values based on changes to log output adding Pass to log output and updating pytests accordingly Fix/learning/hebbian (#659) swapping all log references to 'simple_time' with the full 'time', and removing old code which handled time stamp duplicates in progress - refactoring target spec/validation to work the same way as input spec/validation renaming object --> component in _adjust_target_dict() updating pytests to match RecurrentTransferMech switch from full matrix to hollow matrix; changed expected output or set auto = 1 to preserve old expected output, depending on type of test setting default matrix of a RecurrentTransferMechanism to a hollow matrix, and updating docs to be clearer about how auto, hetero, and matrix combine/overwrite each other when multiple arguments are specified renaming object --> component in _validate_targets method to avoid shadowing python built-in updating pytest expected results to match increment change in log log pytest for a mechanism that is scheduled to run many times in a row changing increment size on log's time_step workaround temporary workaround for timestep values: incrementing first decimal of timestep revising log tests for new time_step notation temporary workaround for timestep values: incrementing first decimal of timestep revising parse_entries_for_time_values method on log so that it edits the time values in the log items directly, rather than maintaining a separate list of modified time values setting axis=1 on calls to np.sum and np.product in Reduce function and adding tests for this function documentation typos documenting reinitialize on mechanism continuing to add tests and docs for reinitialize fixing bugs that prevented initialize method on system from ever executing, and adding pytests for it now that it works revising outdated TransferMechanism docs for reinitialize continuing to add tests to highlight differences between calling reinitialize on a mechanisms and on a function adding nparray_dictionary to docs and revising nparray to use the same helper methods as nparray_dictionary Time: fix bug where RUN counter would not be incremented on new runs fixing (temporarily) time_step bug in nparray_dictionary; reorganzing nparray_dictionary into methods that can be reused by nparray refactoring log to have a dictionary option and writing tests for it beginning to add a dictionary alternative to the options for whats returned by the log more calls to _dealias_owner_name required in order to create log.nparray fixing bug in log: needed to switch between 'value' and mechanism name in several loops in order to assemble log.nparray - Feat/rl/for mads (#652) Feat/rl/for mads (#651) adding more pytests for reinitialize and fixing reinitialize bugs; beginning to update documentation adding pytests for reinitializing at both function and mechanism level; cleaning up mistakes in reinitialize() methods along the way Merge branch 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/Projection/Context_devel adding a reinitialize method on mechanisms, which calls reinitialize on its function or integrator_function, then updates the mechanism's value and output states beginning to refactor reinitialize as a method on integrator functions Removed Print Statements (#650) cleaning up documentation to match how LinearMatrix works in all cases typo in linear matrix function validation simplifying non-projection branch of validation on LinearMatrix function and adding more pytests default_variable: let argument override input_states variable spec if compatible adding pytests for possible combinations of variable and matrix specifications for LinearMatrix as a function of a mechanism adding validation comparing matrix to variable when LinearMatrix function is called by a mechanism; creating square full connectivity matrix that matches variable when matrix is not specified tutorial: reenable graph drawing; requires graphviz package tutorial: clear outputs Lena Program 1 Bugfix (#648) Hebbian learning fix (#647) User defined function updates (#646) adding working version of LinearMatrix function pytest (only works because default_variable is specified on both the mechanism and the function) fix input_states argparsing to not be dependent on default_variable or size args tests: ensure leabra tests get skipped if module is not available splitting linear matrix function's validation into two branches because matrix is handled differently when the function is called by a projection vs a receiver docstring wording change Docs/models/title changes (#645) Docs/nieuwenhuis/edits (#644) adding pytest for ProcessingMechanism with LinearMatrix function to begin debugging why this fn only works in Projections removing unrestrictedtransfermechanism file because this mechanism is now called ProcessingMechanism and does not need its own file adding parameter state docs examples back in with doctest SKIP revising proccessing mechanism docs because it is not an executable mechanism (not just an ABC) renaming UnrestrictedProcessingMechanism --> ProcessingMechanism and moving code into processingmechanism.py (which formerly only contained ProcessingMechanism_Base Leabra Update (#642) DDM: update is_finished to work on functions with any dimensional variable skipping transfer mechanism doc tests skipping transfer mechanism doc tests minor documentation changes -typos and formatting mistakes reorganizing integrator mechanism pytests for reinitialize overwriting AGTUtilityIntegrator's reinitialize property - requires custom reinitialization of short term and long term utility overwriting FHNIntegrator's reinitialize property - requires custom reinitialization of v, w, time, value overwriting reinitialize property on DriftDiffusion Integrator so that time can also be reset documenting reinitialize on all Integrator functions and fixing a typo in transfer mechanism docs (initial_value --> initializer) continuing to add docs and examples for reinitialize, and cleaning up TransferMechanism docs along the way fixing tutorial indexing bug refactoring is_finished as a property so that it is always up to date, even when values change in between executions (i.e. if threshold was crossed and then reinitialize was used) fixing bug in transfer mechanism documention examples (np.array typo) renaming reset_intializer --> reinitialize adding unrestricted mechanism pytests to confirm that mechanism can be constructed and executed with any function -- identified two exceptions (linear matrix and back prop) adding a new mechanism that has no restrictions on which functions can be used commenting out show graph lines in tutorial for now because graphviz is not imported on testing server adding updated version of tutorial from Justin Defaults*: fix class structure addressing bugs revising transfer mechanism documentation -- 'creating' section commenting out show_graph in EVC gratton pytest so that this line does not run on Jenkins adding TransferMechanism pytests to verify previous_value persists over multiple runs/executions AND previous_value resets whenever reset_initializer is used edited NieuwenhuisModel docs tutorial: remove old version - new version is in tutorial/ dir tutorial: support execution on mybinder.org tutorial: support execution on mybinder.org tutorial: remove old version - new version is in tutorial/ dir • Niewenhuis model - docstring edits - adding integrator_mode and integrator_function attr documentation for all transfer mechanism types revising outdated documentation for transfer mechanism noise fixed bug in plotting Nieuwenhuis Model updated Nieuwenhuis documentation adding attrs that were missing from LCA mechanism docs and revising related documentation Scripts: clean up Functions: add UniformToNormalDist to top-level psyneulink module; update docs revising explanation of user_params revising explanation of user_params revising parameter state documentation adding Markus' Nieuwenhuis documentation, plus figures and some .rst formatting Functions: replace internal calls to find owner's name with a property Component: make string version of *defaults classes be sorted removing parameter state example from file completely (tried commenting it out originally) removing parameter states example from documentation because it may be the reason parameter state tests are failing renaming 'Core Configurable Attributes' --> 'Core Structural Attributes' in Component documentation Refactor/system/controller (#627) Fix/controlmechanism/assign as controller (#625) • Log (#624) fixing typo in doctest (parameter state values) adding a docs example which walks through how a mechanism parameter and a function parameter and their mod_ versions change in value BogaczEtAl: use better numpy method for floating point warning handling utilities: update compatibility checker to terminate earlier in some cases updating modulation-related documentation to include mod_param and be more precise about what is updated by modulation (the parameter value used by a function changes, but the corresponding function attr does not change b/c it is the base value) adding documentation for mod_param allowing user to pass value into mod_param setter (even though setting is not allowed) in order to produce a more informative error message) commenting out noise and smoothing factor properties in transfer mechanism because these replace the default properties, causing unexpected behavior adding pytest to verify correct error message when user tries to set to mod_param_name adding pytest to track changes in attr, _attr, mod_param_name, and userparams[param_name] values of Transfer Mechanism's configurable params when (1) param values are updated (2) mechanism is executed adding an exception to make_mod_param as a temporary fix for function-specific mod_param properties that stay on mechanism class when function changes fixing typo in AGTUtilityIntegrator cleaning up function.py and verifying that self.get_current_function_param is used in all functions (skipped learning functions for now) Fix/controlmechanism/assign as controller (#620) Fix/controlmechanism/assign as controller (#619) cleaning up recurrent transfer mechanism pytests and fixing bugs in asserts updating matrix setter to also set the projection's matrix parameter state's function's previous value uncommenting auto and hetero properties from auto associative projection so that setting auto and hetero directly on the projections works adding auto and hetero properties to recurrent transfer mechanism. Auto, hetero, and matrix setters now all update recurrent_projection's matrix parameter state's function's previous_value Fix/controlmechanism/assign as controller (#618) executing projection individually in tranfer mechanism's matrix-change pytest adding a matrix-change pytest for a mapping projection between two transfer mechanisms in order to isolate the matrix bug from auto/hetero properties Defaults: clean up method organization fixing shape typo in gilzenrat script fixing overly strict rate param validation that caused bug in cases where mechanism looks up parameter state value refactoring transfer mechanism to use get_current_mechanism_param() refactoring LCA to use get_current_mechanism_param() refactoring kwta's _kwta_scale() to rely on get_current_mechanism_param() adding get_current_mechanism_param method on mechanism base to try to look up parameter state value remove now-unused time_scale param from many objects (not in scheduling where it's still used) log doctests: ignore tests with inconsistent whitespacing removing auto and hetero assignments from params dict in recurrent transfer mechansim removing unnecessary auto and hetero code in auto associative projection to clean up the relationship between the recurrent projection, its mechanism, and the auto, hetero, and matrix, attrs requiring _kwta_scale method to use k_value parameter state value when available commenting out calssPreferences in transfer mechanism because they cause bugs in KWTA when classPreferences try to update removing attempt to look up recurrent projection's matrix in matrix getter (because the recurrent projection looks up its owner's matrix) refactoring matrix getter on auto associative projection to look up owner's matrix whenever possible directly updating auto and hetero attrs at the same time that their parameter states are created in the auto specified, hetero = None and hetero specified, auto = None cases beginning to refactor auto/hetero/matrix handling to fit with new parameter state value and make_property changes; beginning by removing obsolete code in recurrent transfer mechanism removed CentralClock from MontagueDayanSejnowski96.py fixed typo in owner attribute description Fix/function/validate params (#616) Defaults: set up structure to allow proper aliasing for *Defaults classes - Renamed MontagueModel.py to MontagueDayanSejnowski96.py - Correct RST formatting in PredictionErrorMechanism docs - Added Arguments and Attributes to docs for PredictionErrorMechanism LinearCombination: rework check for division by zero error to be more general default_value: refactor into instance_defaults Component: add metaclass for *Defaults to allow some user convenience functionality Refactor/control signal/update to intensity (#613) Fix/component/intensity and value (#612) Fix/gilzenrat model/prefs bug (#611) updating DDM mechanism to get threshold using get_current_function_param method when it uses threshold to determine decision variable continuing to update how parameters are accessed in pytests (should be mod_ now in many cases) replacing .matrix with .mod_matrix in learning pytests adding a call to super in projection's _instantiate_attributes_after_function so that it calls make_property_mod (on component) Fix/ddm/threshold validation (#610) calling get_current_function_param in the remaining functions and fixing small bugs along the way (missing keyword for 'gamma', np.atleast_2d(rate) in lcaintegrator) moving make_property_mod back to component.py (from parameterstate.py) -- it is now called for all parameter states during _instantiate_attributes_after_function rather than by individual parameter states Docs/td learning/doc fixes (#609) removed show graph call from test_reinforcement resetting test_multilayer from devel and removing matplotlib from test_prediction_error_delta_function specifying smoothing_factor=1.0 on pytests that used to use default smoothing_factor (1.0 --> 0.5) changing smoothing factor (formerly time_constant) default value to 0.5 -- it was confusing to users that the default param value prevented integration renaming 'time_constant' --> 'smoothing_factor' on TransferMechanism types that use AdaptiveIntegrator Fix/log/trial and run (#607) Feat/log/trial and run (#606) Refactor/project/learning vs executing (#605) correcting capitalization cleaning up documentation adding asserts to parameter states pytests in order to start tracking down bug where mod_noise looks up the parameter state value of the last instance created Refactor/mechanism/value in execute 2 (#603) predictionerrormechanism docs: move gilzenrat svg files from build dir to source dir Fix/log/tuple datum value (#601) registry: handle case where default-named projection to a duplicate named mechanism would incorrectly detect the projection name as a duplicate finished TD Learning documentation Fix/state/matrix spec and learning (#600) Fix/component preference set/class preferences (#598) Fix/log/set log conditions bug (#596) updating Transfer functions (Linear, Logistic, Exponential) to use get_current_params(KEYWORD) instead of paramsCurrent[KEYWORD] adding get_current_param method which tries to return mod_param and returns param if that doesn't exist -- will eventually be added to all functions, starting here with DriftDiffusionIntegrator Docs/log/hint (#595) updating shape inconsistencies in DriftDiffusionIntegrator / DDM Mechanism related to time and threshold removing special handling of DriftDiffusionIntegrator threshold in variable=array case (correct behavior is ambiguous) docs: add extra sub-version number in version display utilities: enhance method to recursively convert items to np.ndarray, handling hard cases for np.array remove scratch pad and ignore Docs/log/log clean up (#593) Docs/log/log clean up (#592) remove scratch pad Docs/log/log clean up (#591) Names/log/set log conditions (#590) adding pytests to verify that threshold and is_finished work as expected; commenting out tests with DriftDiffusionIntegrator and len(default_variable) > 1 because correct behavior is ambiguous (for now) adding 'threshold' param on DriftDiffusionIntegrator which stops accumulation at the threshold, and updated DDM's is_finished to look at this updating shape of time computation in FHN integrator (was list, now float) updating gilzenrat pytest which was checking _gain and gain to verify modulation to now use gain and mod_gain updating pytests and adding comments to possibly fix shape of ddm time value, which changed from a list to a float after property refactoring add realtime timestamps to Scheduler, for creation time and end of last RUN time change usages of now defunct times attribute of Schedulers to new version updating mod_param_name property creation to happen at the instance level in both cases (formerly created on mechanism classes) unindenting misplaced setting of _param_name attributes Bugfixes (#588) setting _param_name for all param_names that go through _validate_params resolves SOME of the cases where getter looks for _param_name before setter creates an _ attr Feat/log/add entry (#587) Fix/log/log initialization (#586) Feat/log/clean up (#585) Feat/log/clean up (#584) Feat/feat log with time (#583) rename psyneulink.scheduling.timescale -> psyneulink.scheduling.time create and integrate a new Clock class, and several new classes to keep time, used in Scheduler and Conditions adding _param_name to script for better output comparison with older versions (when _ stored the base value) solving bug where _param_name did not exist on TransferMechanism instances, but introduced new bug where last param value that was set is starting param value of next instance remove old Clock/CentralClock debugging make property execution main documentation for PredictionErrorMechanism done adding mod_slope to the current parameter state pytests adding make_property_mod method to parameter states -- executed at the end of _instantiate_parameter_state method and creates a property called mod_param_name on each param that has a parameter state which looks up the current parameter state value limiting make_property's resposibility to validation -- setter runs validation and then sets to _param_name, getter returns _param_name. mod_param_name property will handle getting parameter state value Feat/log/log levels (#580) test beginning to separate make property into two methods added PredictionErrorDeltaFunction and docs for PredictionErrorMechanism & Montague model Refactor/log/entry management (#579) montague models working! Docs/log/docstring update (#578) Add integrator function tests Add transfer function tests Add distance function tests function: test for both 1d and 2d noise setup.cfg: Use warmup if benchmarks are enabled setup.cfg: Disable benchmarks by default pytest: Add benchmarking plugin Fix/log/logged items bug (#577) using UniformToNormalDist pytest as a check of the scipy requirement error message adding documentation for UniformToNormalDist validating uniform-to-normal distribution function (matlab) Docs/log/docstring update (#572) adding gilzenrat figures in _build file adding pytest file for parameter states Name/log/numpy array to nparray (#571) Feat/mechanism/additional props (#570) Feat/log (#569) EVCAuxiliary: replace kwargs function signatures with explicit arguments add docstring explanation for processing and learning termination conditions Feat/log (#568) adding LC Control Mechanism test to verify that it is updating multiplicative param(s) of modulated mechanism(s) properly fix incorrect construction of Process and System in Multitasking example script Feat/log (#565) Feat/log (#564) almost working! add travis config file single source package requirements fixed error message in LinearMatrix adding a pytest for the new uniform --> normal distribution function fixed sample input updating recurrent transfer mechanism and transfer mechanism documentation • State - _validate_variable: removed: if not context: context = kwAssign + ' Base Value' else: context = context + kwAssign + ' Base Value' Fix/component/default naming (#558) remove Scratch Pad clean up DDM examples with verified parameters from matlab skip NavarroAndFuss doctest because build server cannot access matlab update NavarroAndFuss to use the correct version of the MATLAB simulation convert DDM return_value for NavarroAndFuss function to be floats to allow NaN assignment fix bug in using the matlab engine to run a script outside of the current dir adding validation on NormalDist function in the case where some numpy versions throw an error • System (#556) adding new UniformToNormalDist function which allows for a direct comparison of random numbers between python and matlab Feat/system/show graph (#555) adding integration_method to FHNIntegrator docs and refining error message Fix/modulatory specifications (#554) clean imports in function.py commenting out assertions in OU integrator pytests until its equation is validated fixing mistake in implementation of OUIntegrator adding LCAIntegrator docs to function docs page and continuing to touch up typos and incorrect info throughout function docs continuing to add documentation for LC Control Mechanism params adding matlab and psyneulink plot svgs adding pnl and matlab plots plus some additional notes to the Gilzenrat Model page of the documentation fixing typos in FHNIntegrator docs documenting the LCControl mechanism parameters that hand values off to the FHNIntegrator as well as scaling_factor_gain and base_value_gain cleaning up FHNIntegrator docs with tables for explaining parameters and latex equations typos in run (input spec) docs cleanup Scheduler doc examples add parsing handler for Scheduler termination_conditions move static .svg files from docs build directory to source dir update docs to show 0.0.x versions instead of just 0.x (we use the former frequently) fix broken package link for AutoAssociativeMechanism that caused sphinx automodule to fail removing references to 'inhibition' and 'decay' in LCA docs removing gilzenrat transfer mechanism from the repo updating gilzenrat unit tests to use LCA mechanism in place of GilzenratTransferMechanism fix bug where versioneer wasn't available at the correct time in building docs adding a note about the recurrent matrix to LCA docs rewriting gilzenrat model in terms of LCA rather than 'GilzenratTransferMechanism' removing LCA pytest from recurrent transfer pytests file now that LCA has its own tests updating LCA documentation -- removing beta & inhibition, adding leak, competition, and self_excitation.: setting default values for new LCA params adding pytest file for LCA and testing length 1 variable and length 2 variable cases added output_states param to call of PredictionErrorMechanism constructor added default variable param to call to LinearCombination in PredictionErrorMechanism adding 'leak' parameter and renaming 'auto'-->'self_excitation' and 'hetero'-->'competition' on LCA mechanism Refactor/state/doc test bugs (#551) fix bug where invalid escape strings in docstrings would cause failure on python 3.6.x fixing incorrect documentation of LCA (did not reflect new LCAIntegrator function) continuing to clean up Gilzenrat model and its model-specific components -- verifying that all arguments are consistent and correctly documented manually setting outputstate variable size adding params for G and k to LCControl mechanism as a temporary solution for allowing the user to modify the equation that computes gain as a function of w cleaning up gilzenrat script comments and labeling all params from the paper tried manually setting OutputState value for PEM -- didn't work Refactor/state/ parse state specs lots (#550) use versioneer for single-source versioning adding Gilzenrat changes from Markus fixed target size for PredictionErrorMechanism trying to fix tests correct W293 instances fix bug where intra-numpy-array list->array element conversion would fail on 0-d numpy array input updating logistic function and its documentation to match the more standard form, with an optional 'offset' to take the place of original 'bias' param. Updating all pytests that used what was formerly 'bias' and is now 'offset' trying more things to get td learning working clean up leabra demo script clean up leabramechanism add __all__ to leabramechanism and update relevant package rename certain leabra-specific functions to include "leabra" in preparation for adding to top-level namespace remove unnecessary (and oddly expensive) logging in scheduler fix bug where over/underflows in logistic functions would cause the result to be replaced with 0 (often incorrect format and destructive) remove forced error on warnings Leabra script cleaning (#547) cleaned up Matlab scripts & EVC Gratton example script (#546) Docs/project/more docstring fixes (#545) Docs/project/more fixes (#544) Docs/project/fixes (#543) reformat Example scripts to new import style, and clean up setup Scripts/Examples folder with desired scripts remove old/undesired scripts adding input spec figures to run documentation rename _get_matrix to get_matrix Revert "Fix/scripts/cleanup (#539)" commenting out all clip (formerly range) code because it does not work as expected fixing formatting typo in documentation continuing to clean up input specification for (1) heterogenous variables and (2) a limited version of 'sequence' specification Fix/scripts/cleanup (#539) updating documentation example pytests to verify all inpt values against specified input values updating documentation example typos Feat/transfer mechanism/add std output states (#538) refactoring system input state creation to create one system input state (and mapping projection) for each input state of each origin mechanism Feat/transfer mechanism/add std output states (#537) Fix/output states (#536) Refactor/transfer mechanism/mutiple output states (#535) updating transfer mech execute to check the type of its function and call it once or once per input state accordingly, plus Jon's instantiate_output_states reclassifying softmax as a 'NormalizingFunction' instead of a 'TransferFunction' so that we can easily identify transfer mechanism functions that should be executed separately for each input state use pytest fixture for registry reset in tests/naming to ensure it gets called renaming --> on TransferMechanism types in order to not overwrite Python built-in range Refactor/naming (#533) add download link for GilzenratModel.py updating kwta and recurrent transfer mech pytests to match new output shape cleaning up imports so test will run add values(), show(), and nice str/repr methods to InstanceDefaults move name assignment (in registry call) to before input_states arg handling in mechanism Revert "Refactor/mechanism/preprocess variable (#531)" updating transfer mechanism pytests to match new shape of output updating transfer mechanism to call its function separately for each input state (each element of variable); for now, integrator function still only executes once add shell classes to top-level psyneulink namespace correct bug that would cause specifying 3d arrays as default_variable to assign default_variable incorrectly add method to np.array-ify all elements within a list/array continuing to add pytests for input specification - stuck on verifying that the input specification worked via tools (e.g. call_after_trial) available to the user, because non primary input states are getting overwritten as None updating documentation for input specification -- adding tables of inputs on each trial with code snippets Fix/mechanism/ parse arg input states (#532) Increment version to 0.4.0 add more input_state spec tests to handle currently known combinations for setting default_variable Refactor/mechanism/preprocess variable (#531) Refactor/mechanism/preprocess variable (#530) Docs/state and projections/docstring revs (#529) correct bug in _parse_arg_input_states where a non-list argument wouldn't be made into a list before processing change behavior of _parse_state_spec to not populate the state dict with a variable if it's a ClassDefault updating noise validation to compare against entire variable (possibly multiple input states) and updating error messages in pytests to reflect these changes updating 'try_execute_param method to expect 2d variable and return 2d param updating pytests for input specification documentation examples to match the new documentation examples continuing to update docs for inputs to system revising the input specification docs to describe the rules in terms of matching the mechanim's variable - also making the convenience cases clearer removing references to timescale in run and system docs Fixed/state/ parse state spec/projection spec (#528) Refactor/distance metrics (#526) Docs/latex math (#525) Docs/intro materials (#524) continuing to add pytests to test new input specification rules updating some reporting statements to match the new form of inputs (dict) continuing to clean up input specification; running inputs first through a new method called _input_matches_variable which catches some numpy mistakes specific to input validation that slip through iscompatible Logo (#523) make self.name return unnamed .__class__ in case no name was set Docs/input state specs (#522) Fix/input state specs (#521) continuing to add pytests for testing input specifications updating process and system to handle the new execution_inputs dict that they receive from run consolidating and revamping input processing to get rid of any references to , repetitive code. still some clean up to do -- 5 pytests failing Fix/input state specs (#520) Fix/input state specs (#519) beginning to consolidate input validation because we no longer have phases and don't need to handle systems and processes differently -- 22 pytests failing Fix/input state specs (#518) using new EULER option on the LCControlMechanism in GilzenratModel in order to match original model adding validation requiring integration_method to either be RK4 or EULER adding 'integration_method' to LCControlMechanism so that user can switch between euler and rk4 integration for the built-in FHN function fixing some params to match matlab model; made it easier to swtich between high C and low C params switching FHNIntegrator to use euler integration scaling entire noise term by sqrt(dt) rather than scaling the standard deviation of the noise term by sqrt(dt) Naming/registry/default name 0 (#516) beginning to add in an exception which will allow the case where all mechanisms specify one input which is the same shape as their variable (i.e. no outer list for trials) hack mechanism to be able to accept instance_defaults.variable setup via input_states argument still trying to fix inputs cleaning up sytem unit tests to match new input spec (outer set of brackets representing trials required) cleaning up mechanism unit tests to match new input spec (outer set of brackets representing trials required move input_states spec tests in test_transfer_mechanism to new file update current input_state spec tests make test_transfer_mechanism tests use instance_defaults.variable instead of incorrect .variable Docs/state and projection (#515) remove uses of self.variable. (it is vestigial and maintained only for user inspection) rename duplicate transfer mech test to avoid overwrite adding input specification pytests to test_system in order to verify which input spec formats already work and build on this pull from devel Refactor/control and gating signals (#514) Import leabra and run leabra tests only if leabra module is available. Leabra wrapper prototype (#513) Fix/utilities/iscompatible final rev (#512) Fix/utilities/iscompatible (#511) rename System and Process to add _Base suffix in shellclasses.__all__ because of abf3e7e and 6b9e9a4 Clean up/registry/ register category (#508) Refactor/projection/connection specs (#507) Refactor/gating mechanism/ instantiate gating signal (#506) • Projection (#505) updating comments and error messages in _construct_stimulus_sets to reflect changes updating 3 recurrent transfer mech unit tests which used 'sequence format' of input specification for a process to use 'mechanism format' instead Refactor/projection/ instantiate sender (#504) Refactor/state and projection/clean up (#503) commenting out branch of _construct_stimulus_sets which parses inputs by the 'sequence format' rules -- seems safe to move entirely to mechanism format b/c all pytests use 'mechanism format' and new examples using 'sequence format' do not work weird hybrid prediction error mechanism fix typo in ObjectiveMechanism docstring causing weird documentation formatting avoid using module-level Mechanisms in unit tests to avoid possible conflicts Refactor/state and projection/unit tests bug fixes (#502) Refactor/state and projections/unit tests (#501) Refactor/state and projection/names and docs (#500) requiring version 1.4 of toposort moving imports to top of gilzenrat pytests file adding full gilzenrat model to pytests -- no comparison data to assert yet, just verifying that model can run without errors adding pytests that isolate the GilzenratTransferMechanism and moving FHNIntegrator test that recreates figure 2 from gilzenrat paper from integrator mechanism tests --> gilzenrat tests fixing up a few model values in the gilzenrat model -- behavior is not quit right -- and switching number_of_trials back to 1 Optimize registry duplicate naming adding progress statement ('% complete') to gilzenrat script implementing noise on LCAIntegrator and cleaning up unnecessary integrator function code (removing GilzenratIntegrator) replacing GilzenratIntegrator with LCAIntegrator (with rate=-1) in GilzenratTransferMechanism Refactor/state and projection/specification bug fix 2 (#495) Refactored instantiation of States and Projections (#494) updating mechanism pytests to reflect integrator_function shape change and removing extraneous transfer mechanism tests which returned arrays of mixed types indexing into the first element of the transfer mechanism's integrator_function result so that the shape passed to the transfer mechanism's function is the same as if integrator_mode were false add component module to main psyneulink package fold keywords into first level hierarchy, because some keywords aren't defined in Keywords.py and this is confusing skip notebook checkpoints in running notebook tests stop package-level __all__ assignments from accidentally overwriting the __all__ objects they used as bases fixing bug in NormalDist() function which was shifting the mean of the distribution fix link to the tutorial in docs that didn't get changed when tutorial/ directory was created correcting LCAIntegrator function to match the papers (since it represents a rate of change, we need to integrate over timesteps) and relaxing integrator rate param validation which was blocking variables of lengths > 1 Devel (#490) improving initial conditions by making first recurrent projections to recurrent mechanisms make sense given their starting values make Function_Base inherit its paramClassDefaults from its parent class Function instead of Component remove DefaultProcessingMechanism from component/__init__.py because it's an instantiation of a _Base class, and doesn't get used removing and re-adding gilzenrat transfer mechanism because name change did not seem to work updating value of LC control mechanism output before it runs to match initial previous value (had to do this in the gilzenrat script because of other LC control mechanism hacks, but left a placeholer in ControlMechanism for how to implement this more generally for any control mechanism that accumulates) adding a new Integrator function that matches the decision and response layer functions in the Gilzenrat paper, and a new transfer mechanism which calls this integrator before its primary function update README and docs index.rst to new PyPI installation instructions, and tutorial section, reorganize reformat README into .rst format so pypi can format it nicely update short description to match the title line in the long description update setup.cfg for wheel creation and to include license file update setup.py supported Python versions to include only 3.5 and 3.6 (does not work on < 3.4 due to numpy, does not work on 3.4) update setup.py classifier for Apache license add tutorial_requirements.txt mirroring setup.py requirements add requirements.txt mirroring setup.py requirements update setup.py packages add MANIFEST.in remove SOFTWARE ARCHITECTURE and TODO List remove extraneous files add docstrings to __init__.py files (for help command) update tutorial to new easier import style update docs to handle new module/package format update package __init__.py files for simple importing add __all__ lists to modules rename globals/run.py to globals/environment.py to avoid namespace conflict with run method clean up main package __init__.py replace paramClassDefaults PROJECTION_SENDER with OutputState class instead of keyword to prevent error due to failed conversion rework imports to avoid circularities due to packaging make LearningMechanism get its paramClassDefaults from its parent and not Projection_Base remove mechanism factory method remove system factory in favor of just instantiating System class remove process factory in favor of just instantiating Process class switch name of Process and Process_Base switch name of System and System_Base move typecheck for _get_modulated_param inside to avoid circular import remove old pyargs argument for pytest relaxing validation on LCAIntegrator rate param in order to create an LCA example in integrator mode with an array input cleaning up resolving merge conflicts fixing merge conflicts started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism starting TDDelta Function -- very messy 2 of 3 test working integrating td learning cleaning up Function.py for pull request tests working! Q-matrix initialization working; mechanism does not Added Q-learning and SARSA algorithm
kmantel
added a commit
that referenced
this pull request
Apr 5, 2018
* devel: Feat/mechanism/input target label dicts (#751) Scheduling: fix bug where termination conditions persisted across calls to run tests,function/LinearCombination: Add tests with absent parameters test,function/LinearCombination: Rename second test function to prevent overwriting results • Context (#746) Refactor/context/deprecate init status (#745) Refactor/context/structured (#744) Fix/function/stability (#743) • IntegratorMechanism (#742) Feat/context/time (#740) Feat/context/time (#739) Image Fix (#738) finally fixed image (#737) Image Fix (#736) Example Fix (#735) Linear combination fix (#734) Feat/component/execution count (#733) jvesely/linear_combination_function_refactor (#732) Refactor/project/context rev 2 (#731) Refactor/system/show graph structure options (#730) • System (#729) Feat/mechanism/show structure (#728) Feat/mechanism/show mechanism (#727) jvesely/linear_combination (#724) creating a property for TransferMechanism's integrator_mode so that the mechanism can switch integrator mode on and off Fix/function/udf examples (#722) • Function (#717) Refactor/function/udf (#716) Refactor/mechanism and output state/mech params dict added (#715) Docs/output state/clean up (#714) Clean up/function/softmax one hot (#713) Name/project/replace assign index calculate (#711) Fix/controlmechanism/assign as controller jdc (#705) Feat/function/one hot cleanup (#704) Feat/function/one hot (#703) adding a pytest for the clear_log method updating output of nparray_dictionary when there are no entries from None to an empty OrderedDict Tests/llvm devel sync (#684) removing show graph pdfs from tests folder revising the show_graph pytests to call '_get_label' as a proxy for whether show_graph with dimensions is working moving _get_label helper function outside of show_graph method, so that it can be accessed on its own fixing bug in show_graph(show_dimensions=True) by taking np.atleast_1d of output_state.value • LearningProjection docstring rev (to include error_function) Feat/process/learning objective mech (#698) Feat/ddm/selected input array (#697) Feat/ddm/selected input array (#695) user_params and function_params now look at parameter state values (rather than param base values), and are updated whenever mechanisms update their parameter states adding pytests that call show graph after creating various types of systems -- may refactor these to call the individual methods of show_graph removing system graph pdfs removing show_dimensions=True from call to show_graph in GilzenratModel because it generates an error updating how valus are retrieved from log in Nieuwenhuis model (based on addition of Pass to log) Fix/system/learning ends before terminal (#692) Fix/system/learning ends before terminal (#691) Revert "Merge branch 'master' into fix/system/learning_ends_before_terminal" - • ControlMechanism _instantiate_control_signals: debugged OWNER_VALUE assignment • Scripts/Examples Rumelhart Semantic Network: updated with step function • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • OutputState docstring revs • OutputState docstring revs fixing documentation formatting mistake continuing to add pytests and doc fixes for clip on transfer mechanism types allowing lca to execute function over entire variable, not just first item fixing documentation for clip continuing to add error messages to reinitialize allowing smoothing factor to be an integer (formerly 1.0 and 0.0 were allowed but 1 and 0 were not) removing typecheck on learning mechanism's default_variable adding exception in UDF so that function can be called without params and context correcting error message for initial_value validation on transfer mechanism fixing bug in reinitialize on arrays (needed np.atleast_2d when setting intial_value because it is compared to variable) - • OutputState docstring revs Refactoring of OutputState to support flexible assignment of its variable attribute. Revert "-" Revert "-" Revert "-" - adding pytests for specific reinitialize cases that were not covered, and adding error messages that were missing for some of them - fixing documentation typo: integration_method was mistakenly called integration_method_FHN in docs - - - - - - Reworking Montague, Dayan, and Sejnowski model documentation. - Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state - - - - - - • Utilities - recursive_update(): added non-destructive option that preserves any non-empty entries in destination dict - - - • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() - - - - - - adding pytests for invalid target specifcation to confirm that the proper error messages are generated • OutputState assign function now expects dict as argument - WORKING adding more pytests to confirm that convenience notations and combinations of function and list target specs all run documenting targets and adding some checks to adjust targets: verify that num_targets = num_inputs, and ignore num_targets in the case of function specifications (because a new value is generated on each trial) - - - - • OutputState - implemented assign that takes assign_params_dict as arg Fix/output state/assign backward compat (#676) • OutputState added backward compatibility docstring: document replacement of calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN in progress: refactoring function specification of target spec to be an option within the dictionary specification, rather than on its own • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN Feat/ddm/input state as array (#674) revising documentation for target specification cleaning up a typo in target_spec_parsing (comparator mechanism was referenced where it should have been terminal mechanism) moving call to _check_args in BackProp to before the error matrix is updated in order to avoid a validation bug adding pytests for target spec convenience notations adding run to rumelhart tests (previously only created systems) Merge branches 'clean_up/function_and_system/backprop_and_show_graph' and 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into clean_up/function_and_system/backprop_and_show_graph revising how target input state values are assigned in system's execute_learning adding a simple multilayer learning pytest refactor execute and _execute methods defaults: remove post-hoc conversion of defaults variable Component: don't convert defaults variable on calls to validate a variable parsing: add initial_value parser parsing: add generic argument parser used as default if none specified Component: add method to parse user inputted variable to useable/standard form utilities: handle nonuniform objects better when converting to numpy arrays control: refactor handling of allocation* projections: refactor sender instantiation to avoid directly setting instance default variable clean up input_states handler rename input_states arg parser to handler maint: add comments to separate handler, parsing, and validation methods maint: remove unused PROJECTION_SENDER_VALUE TransferMechanism: use standard form of setting default variable utilities: change number detection to accept any number, not just int and float OutputState: when variable not specified to constructor, pass up another value make self.variable read only (we should not be using it for logic) replace calls to self.variable to proper self.instance_defaults.variable validation: remove extraneous check for ClassDefaults.variable ClassDefaults: make RecurrentTransferMechanism default require 2d variable because it takes an AutoAssociativeProjection that uses a LinearMatrix that requires 1D Distance: fix validation assumption that items of passed variable are iterable ClassDefaults: correct and consolidate utilities: add method to produce a value for length calls when len() fails utilities: add function to determine whether something is iterable Integrators: handle initializer like variable in Components Function: standardize default_variable assignments ProcessingMechanism: use standard assignment of default variable DDM: use standard assignment of default variable ensure default_variable auto sets to dtype float combine handling of default_variable/size to create instance_defaults.variable in Component.__init__ utilities: allow list->array element conversion to typecast internal items validation: fix validate_variable crashes on certain variable types utilities: add helper method to determine if an object contains a single value rename variable->default_variable Clean up/function and system/backprop and show graph (#671) Clean up/learning/misc (#670) Clean up/learning/misc (#669) Clean up/learning/misc (#668) Fix/transfermechanism/noise function (#667) Fix/transfermechanism/clip (#666) Refactor/modulatory signals/linear default function (#665) Refactor/learning/heterovergent (#664) in progress - refactoring adjust_target_dict method to validate all candidate targets and confirm that all mechanisms provided the same number of targets Tests/mechanism/hebbian learning (#663) Docs/function/hebbian (#662) Docs/function/hebbian (#661) updating pytest expected values based on changes to log output adding Pass to log output and updating pytests accordingly Fix/learning/hebbian (#659) swapping all log references to 'simple_time' with the full 'time', and removing old code which handled time stamp duplicates in progress - refactoring target spec/validation to work the same way as input spec/validation renaming object --> component in _adjust_target_dict() updating pytests to match RecurrentTransferMech switch from full matrix to hollow matrix; changed expected output or set auto = 1 to preserve old expected output, depending on type of test setting default matrix of a RecurrentTransferMechanism to a hollow matrix, and updating docs to be clearer about how auto, hetero, and matrix combine/overwrite each other when multiple arguments are specified renaming object --> component in _validate_targets method to avoid shadowing python built-in updating pytest expected results to match increment change in log log pytest for a mechanism that is scheduled to run many times in a row changing increment size on log's time_step workaround temporary workaround for timestep values: incrementing first decimal of timestep revising log tests for new time_step notation temporary workaround for timestep values: incrementing first decimal of timestep revising parse_entries_for_time_values method on log so that it edits the time values in the log items directly, rather than maintaining a separate list of modified time values setting axis=1 on calls to np.sum and np.product in Reduce function and adding tests for this function documentation typos documenting reinitialize on mechanism continuing to add tests and docs for reinitialize fixing bugs that prevented initialize method on system from ever executing, and adding pytests for it now that it works revising outdated TransferMechanism docs for reinitialize continuing to add tests to highlight differences between calling reinitialize on a mechanisms and on a function adding nparray_dictionary to docs and revising nparray to use the same helper methods as nparray_dictionary Time: fix bug where RUN counter would not be incremented on new runs fixing (temporarily) time_step bug in nparray_dictionary; reorganzing nparray_dictionary into methods that can be reused by nparray refactoring log to have a dictionary option and writing tests for it beginning to add a dictionary alternative to the options for whats returned by the log more calls to _dealias_owner_name required in order to create log.nparray fixing bug in log: needed to switch between 'value' and mechanism name in several loops in order to assemble log.nparray - Feat/rl/for mads (#652) Feat/rl/for mads (#651) adding more pytests for reinitialize and fixing reinitialize bugs; beginning to update documentation adding pytests for reinitializing at both function and mechanism level; cleaning up mistakes in reinitialize() methods along the way Merge branch 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/Projection/Context_devel adding a reinitialize method on mechanisms, which calls reinitialize on its function or integrator_function, then updates the mechanism's value and output states beginning to refactor reinitialize as a method on integrator functions Removed Print Statements (#650) cleaning up documentation to match how LinearMatrix works in all cases typo in linear matrix function validation simplifying non-projection branch of validation on LinearMatrix function and adding more pytests default_variable: let argument override input_states variable spec if compatible adding pytests for possible combinations of variable and matrix specifications for LinearMatrix as a function of a mechanism adding validation comparing matrix to variable when LinearMatrix function is called by a mechanism; creating square full connectivity matrix that matches variable when matrix is not specified tutorial: reenable graph drawing; requires graphviz package tutorial: clear outputs Lena Program 1 Bugfix (#648) Hebbian learning fix (#647) User defined function updates (#646) adding working version of LinearMatrix function pytest (only works because default_variable is specified on both the mechanism and the function) fix input_states argparsing to not be dependent on default_variable or size args tests: ensure leabra tests get skipped if module is not available splitting linear matrix function's validation into two branches because matrix is handled differently when the function is called by a projection vs a receiver docstring wording change Docs/models/title changes (#645) Docs/nieuwenhuis/edits (#644) adding pytest for ProcessingMechanism with LinearMatrix function to begin debugging why this fn only works in Projections removing unrestrictedtransfermechanism file because this mechanism is now called ProcessingMechanism and does not need its own file adding parameter state docs examples back in with doctest SKIP revising proccessing mechanism docs because it is not an executable mechanism (not just an ABC) renaming UnrestrictedProcessingMechanism --> ProcessingMechanism and moving code into processingmechanism.py (which formerly only contained ProcessingMechanism_Base Leabra Update (#642) DDM: update is_finished to work on functions with any dimensional variable skipping transfer mechanism doc tests skipping transfer mechanism doc tests minor documentation changes -typos and formatting mistakes reorganizing integrator mechanism pytests for reinitialize overwriting AGTUtilityIntegrator's reinitialize property - requires custom reinitialization of short term and long term utility overwriting FHNIntegrator's reinitialize property - requires custom reinitialization of v, w, time, value overwriting reinitialize property on DriftDiffusion Integrator so that time can also be reset documenting reinitialize on all Integrator functions and fixing a typo in transfer mechanism docs (initial_value --> initializer) continuing to add docs and examples for reinitialize, and cleaning up TransferMechanism docs along the way fixing tutorial indexing bug refactoring is_finished as a property so that it is always up to date, even when values change in between executions (i.e. if threshold was crossed and then reinitialize was used) fixing bug in transfer mechanism documention examples (np.array typo) renaming reset_intializer --> reinitialize adding unrestricted mechanism pytests to confirm that mechanism can be constructed and executed with any function -- identified two exceptions (linear matrix and back prop) adding a new mechanism that has no restrictions on which functions can be used commenting out show graph lines in tutorial for now because graphviz is not imported on testing server adding updated version of tutorial from Justin Defaults*: fix class structure addressing bugs revising transfer mechanism documentation -- 'creating' section commenting out show_graph in EVC gratton pytest so that this line does not run on Jenkins adding TransferMechanism pytests to verify previous_value persists over multiple runs/executions AND previous_value resets whenever reset_initializer is used edited NieuwenhuisModel docs tutorial: remove old version - new version is in tutorial/ dir tutorial: support execution on mybinder.org tutorial: support execution on mybinder.org tutorial: remove old version - new version is in tutorial/ dir • Niewenhuis model - docstring edits - adding integrator_mode and integrator_function attr documentation for all transfer mechanism types revising outdated documentation for transfer mechanism noise fixed bug in plotting Nieuwenhuis Model updated Nieuwenhuis documentation adding attrs that were missing from LCA mechanism docs and revising related documentation Scripts: clean up Functions: add UniformToNormalDist to top-level psyneulink module; update docs revising explanation of user_params revising explanation of user_params revising parameter state documentation adding Markus' Nieuwenhuis documentation, plus figures and some .rst formatting Functions: replace internal calls to find owner's name with a property Component: make string version of *defaults classes be sorted removing parameter state example from file completely (tried commenting it out originally) removing parameter states example from documentation because it may be the reason parameter state tests are failing renaming 'Core Configurable Attributes' --> 'Core Structural Attributes' in Component documentation Refactor/system/controller (#627) Fix/controlmechanism/assign as controller (#625) • Log (#624) fixing typo in doctest (parameter state values) adding a docs example which walks through how a mechanism parameter and a function parameter and their mod_ versions change in value BogaczEtAl: use better numpy method for floating point warning handling utilities: update compatibility checker to terminate earlier in some cases updating modulation-related documentation to include mod_param and be more precise about what is updated by modulation (the parameter value used by a function changes, but the corresponding function attr does not change b/c it is the base value) adding documentation for mod_param allowing user to pass value into mod_param setter (even though setting is not allowed) in order to produce a more informative error message) commenting out noise and smoothing factor properties in transfer mechanism because these replace the default properties, causing unexpected behavior adding pytest to verify correct error message when user tries to set to mod_param_name adding pytest to track changes in attr, _attr, mod_param_name, and userparams[param_name] values of Transfer Mechanism's configurable params when (1) param values are updated (2) mechanism is executed adding an exception to make_mod_param as a temporary fix for function-specific mod_param properties that stay on mechanism class when function changes fixing typo in AGTUtilityIntegrator cleaning up function.py and verifying that self.get_current_function_param is used in all functions (skipped learning functions for now) Fix/controlmechanism/assign as controller (#620) Fix/controlmechanism/assign as controller (#619) cleaning up recurrent transfer mechanism pytests and fixing bugs in asserts updating matrix setter to also set the projection's matrix parameter state's function's previous value uncommenting auto and hetero properties from auto associative projection so that setting auto and hetero directly on the projections works adding auto and hetero properties to recurrent transfer mechanism. Auto, hetero, and matrix setters now all update recurrent_projection's matrix parameter state's function's previous_value Fix/controlmechanism/assign as controller (#618) executing projection individually in tranfer mechanism's matrix-change pytest adding a matrix-change pytest for a mapping projection between two transfer mechanisms in order to isolate the matrix bug from auto/hetero properties Defaults: clean up method organization fixing shape typo in gilzenrat script fixing overly strict rate param validation that caused bug in cases where mechanism looks up parameter state value refactoring transfer mechanism to use get_current_mechanism_param() refactoring LCA to use get_current_mechanism_param() refactoring kwta's _kwta_scale() to rely on get_current_mechanism_param() adding get_current_mechanism_param method on mechanism base to try to look up parameter state value remove now-unused time_scale param from many objects (not in scheduling where it's still used) log doctests: ignore tests with inconsistent whitespacing removing auto and hetero assignments from params dict in recurrent transfer mechansim removing unnecessary auto and hetero code in auto associative projection to clean up the relationship between the recurrent projection, its mechanism, and the auto, hetero, and matrix, attrs requiring _kwta_scale method to use k_value parameter state value when available commenting out calssPreferences in transfer mechanism because they cause bugs in KWTA when classPreferences try to update removing attempt to look up recurrent projection's matrix in matrix getter (because the recurrent projection looks up its owner's matrix) refactoring matrix getter on auto associative projection to look up owner's matrix whenever possible directly updating auto and hetero attrs at the same time that their parameter states are created in the auto specified, hetero = None and hetero specified, auto = None cases beginning to refactor auto/hetero/matrix handling to fit with new parameter state value and make_property changes; beginning by removing obsolete code in recurrent transfer mechanism removed CentralClock from MontagueDayanSejnowski96.py fixed typo in owner attribute description Fix/function/validate params (#616) Defaults: set up structure to allow proper aliasing for *Defaults classes - Renamed MontagueModel.py to MontagueDayanSejnowski96.py - Correct RST formatting in PredictionErrorMechanism docs - Added Arguments and Attributes to docs for PredictionErrorMechanism LinearCombination: rework check for division by zero error to be more general default_value: refactor into instance_defaults Component: add metaclass for *Defaults to allow some user convenience functionality Refactor/control signal/update to intensity (#613) Fix/component/intensity and value (#612) Fix/gilzenrat model/prefs bug (#611) updating DDM mechanism to get threshold using get_current_function_param method when it uses threshold to determine decision variable continuing to update how parameters are accessed in pytests (should be mod_ now in many cases) replacing .matrix with .mod_matrix in learning pytests adding a call to super in projection's _instantiate_attributes_after_function so that it calls make_property_mod (on component) Fix/ddm/threshold validation (#610) calling get_current_function_param in the remaining functions and fixing small bugs along the way (missing keyword for 'gamma', np.atleast_2d(rate) in lcaintegrator) moving make_property_mod back to component.py (from parameterstate.py) -- it is now called for all parameter states during _instantiate_attributes_after_function rather than by individual parameter states Docs/td learning/doc fixes (#609) removed show graph call from test_reinforcement resetting test_multilayer from devel and removing matplotlib from test_prediction_error_delta_function specifying smoothing_factor=1.0 on pytests that used to use default smoothing_factor (1.0 --> 0.5) changing smoothing factor (formerly time_constant) default value to 0.5 -- it was confusing to users that the default param value prevented integration renaming 'time_constant' --> 'smoothing_factor' on TransferMechanism types that use AdaptiveIntegrator Fix/log/trial and run (#607) Feat/log/trial and run (#606) Refactor/project/learning vs executing (#605) correcting capitalization cleaning up documentation adding asserts to parameter states pytests in order to start tracking down bug where mod_noise looks up the parameter state value of the last instance created Refactor/mechanism/value in execute 2 (#603) predictionerrormechanism docs: move gilzenrat svg files from build dir to source dir Fix/log/tuple datum value (#601) registry: handle case where default-named projection to a duplicate named mechanism would incorrectly detect the projection name as a duplicate finished TD Learning documentation Fix/state/matrix spec and learning (#600) Fix/component preference set/class preferences (#598) Fix/log/set log conditions bug (#596) updating Transfer functions (Linear, Logistic, Exponential) to use get_current_params(KEYWORD) instead of paramsCurrent[KEYWORD] adding get_current_param method which tries to return mod_param and returns param if that doesn't exist -- will eventually be added to all functions, starting here with DriftDiffusionIntegrator Docs/log/hint (#595) updating shape inconsistencies in DriftDiffusionIntegrator / DDM Mechanism related to time and threshold removing special handling of DriftDiffusionIntegrator threshold in variable=array case (correct behavior is ambiguous) docs: add extra sub-version number in version display utilities: enhance method to recursively convert items to np.ndarray, handling hard cases for np.array remove scratch pad and ignore Docs/log/log clean up (#593) Docs/log/log clean up (#592) remove scratch pad Docs/log/log clean up (#591) Names/log/set log conditions (#590) adding pytests to verify that threshold and is_finished work as expected; commenting out tests with DriftDiffusionIntegrator and len(default_variable) > 1 because correct behavior is ambiguous (for now) adding 'threshold' param on DriftDiffusionIntegrator which stops accumulation at the threshold, and updated DDM's is_finished to look at this updating shape of time computation in FHN integrator (was list, now float) updating gilzenrat pytest which was checking _gain and gain to verify modulation to now use gain and mod_gain updating pytests and adding comments to possibly fix shape of ddm time value, which changed from a list to a float after property refactoring add realtime timestamps to Scheduler, for creation time and end of last RUN time change usages of now defunct times attribute of Schedulers to new version updating mod_param_name property creation to happen at the instance level in both cases (formerly created on mechanism classes) unindenting misplaced setting of _param_name attributes Bugfixes (#588) setting _param_name for all param_names that go through _validate_params resolves SOME of the cases where getter looks for _param_name before setter creates an _ attr Feat/log/add entry (#587) Fix/log/log initialization (#586) Feat/log/clean up (#585) Feat/log/clean up (#584) Feat/feat log with time (#583) rename psyneulink.scheduling.timescale -> psyneulink.scheduling.time create and integrate a new Clock class, and several new classes to keep time, used in Scheduler and Conditions adding _param_name to script for better output comparison with older versions (when _ stored the base value) solving bug where _param_name did not exist on TransferMechanism instances, but introduced new bug where last param value that was set is starting param value of next instance remove old Clock/CentralClock debugging make property execution main documentation for PredictionErrorMechanism done adding mod_slope to the current parameter state pytests adding make_property_mod method to parameter states -- executed at the end of _instantiate_parameter_state method and creates a property called mod_param_name on each param that has a parameter state which looks up the current parameter state value limiting make_property's resposibility to validation -- setter runs validation and then sets to _param_name, getter returns _param_name. mod_param_name property will handle getting parameter state value Feat/log/log levels (#580) test beginning to separate make property into two methods added PredictionErrorDeltaFunction and docs for PredictionErrorMechanism & Montague model Refactor/log/entry management (#579) montague models working! Docs/log/docstring update (#578) Add integrator function tests Add transfer function tests Add distance function tests function: test for both 1d and 2d noise setup.cfg: Use warmup if benchmarks are enabled setup.cfg: Disable benchmarks by default pytest: Add benchmarking plugin Fix/log/logged items bug (#577) using UniformToNormalDist pytest as a check of the scipy requirement error message adding documentation for UniformToNormalDist validating uniform-to-normal distribution function (matlab) Docs/log/docstring update (#572) adding gilzenrat figures in _build file adding pytest file for parameter states Name/log/numpy array to nparray (#571) Feat/mechanism/additional props (#570) Feat/log (#569) EVCAuxiliary: replace kwargs function signatures with explicit arguments add docstring explanation for processing and learning termination conditions Feat/log (#568) adding LC Control Mechanism test to verify that it is updating multiplicative param(s) of modulated mechanism(s) properly fix incorrect construction of Process and System in Multitasking example script Feat/log (#565) Feat/log (#564) almost working! add travis config file single source package requirements fixed error message in LinearMatrix adding a pytest for the new uniform --> normal distribution function fixed sample input updating recurrent transfer mechanism and transfer mechanism documentation • State - _validate_variable: removed: if not context: context = kwAssign + ' Base Value' else: context = context + kwAssign + ' Base Value' Fix/component/default naming (#558) remove Scratch Pad clean up DDM examples with verified parameters from matlab skip NavarroAndFuss doctest because build server cannot access matlab update NavarroAndFuss to use the correct version of the MATLAB simulation convert DDM return_value for NavarroAndFuss function to be floats to allow NaN assignment fix bug in using the matlab engine to run a script outside of the current dir adding validation on NormalDist function in the case where some numpy versions throw an error • System (#556) adding new UniformToNormalDist function which allows for a direct comparison of random numbers between python and matlab Feat/system/show graph (#555) adding integration_method to FHNIntegrator docs and refining error message Fix/modulatory specifications (#554) clean imports in function.py commenting out assertions in OU integrator pytests until its equation is validated fixing mistake in implementation of OUIntegrator adding LCAIntegrator docs to function docs page and continuing to touch up typos and incorrect info throughout function docs continuing to add documentation for LC Control Mechanism params adding matlab and psyneulink plot svgs adding pnl and matlab plots plus some additional notes to the Gilzenrat Model page of the documentation fixing typos in FHNIntegrator docs documenting the LCControl mechanism parameters that hand values off to the FHNIntegrator as well as scaling_factor_gain and base_value_gain cleaning up FHNIntegrator docs with tables for explaining parameters and latex equations typos in run (input spec) docs cleanup Scheduler doc examples add parsing handler for Scheduler termination_conditions move static .svg files from docs build directory to source dir update docs to show 0.0.x versions instead of just 0.x (we use the former frequently) fix broken package link for AutoAssociativeMechanism that caused sphinx automodule to fail removing references to 'inhibition' and 'decay' in LCA docs removing gilzenrat transfer mechanism from the repo updating gilzenrat unit tests to use LCA mechanism in place of GilzenratTransferMechanism fix bug where versioneer wasn't available at the correct time in building docs adding a note about the recurrent matrix to LCA docs rewriting gilzenrat model in terms of LCA rather than 'GilzenratTransferMechanism' removing LCA pytest from recurrent transfer pytests file now that LCA has its own tests updating LCA documentation -- removing beta & inhibition, adding leak, competition, and self_excitation.: setting default values for new LCA params adding pytest file for LCA and testing length 1 variable and length 2 variable cases added output_states param to call of PredictionErrorMechanism constructor added default variable param to call to LinearCombination in PredictionErrorMechanism adding 'leak' parameter and renaming 'auto'-->'self_excitation' and 'hetero'-->'competition' on LCA mechanism Refactor/state/doc test bugs (#551) fix bug where invalid escape strings in docstrings would cause failure on python 3.6.x fixing incorrect documentation of LCA (did not reflect new LCAIntegrator function) continuing to clean up Gilzenrat model and its model-specific components -- verifying that all arguments are consistent and correctly documented manually setting outputstate variable size adding params for G and k to LCControl mechanism as a temporary solution for allowing the user to modify the equation that computes gain as a function of w cleaning up gilzenrat script comments and labeling all params from the paper tried manually setting OutputState value for PEM -- didn't work Refactor/state/ parse state specs lots (#550) use versioneer for single-source versioning adding Gilzenrat changes from Markus fixed target size for PredictionErrorMechanism trying to fix tests correct W293 instances fix bug where intra-numpy-array list->array element conversion would fail on 0-d numpy array input updating logistic function and its documentation to match the more standard form, with an optional 'offset' to take the place of original 'bias' param. Updating all pytests that used what was formerly 'bias' and is now 'offset' trying more things to get td learning working clean up leabra demo script clean up leabramechanism add __all__ to leabramechanism and update relevant package rename certain leabra-specific functions to include "leabra" in preparation for adding to top-level namespace remove unnecessary (and oddly expensive) logging in scheduler fix bug where over/underflows in logistic functions would cause the result to be replaced with 0 (often incorrect format and destructive) remove forced error on warnings Leabra script cleaning (#547) cleaned up Matlab scripts & EVC Gratton example script (#546) Docs/project/more docstring fixes (#545) Docs/project/more fixes (#544) Docs/project/fixes (#543) reformat Example scripts to new import style, and clean up setup Scripts/Examples folder with desired scripts remove old/undesired scripts adding input spec figures to run documentation rename _get_matrix to get_matrix Revert "Fix/scripts/cleanup (#539)" commenting out all clip (formerly range) code because it does not work as expected fixing formatting typo in documentation continuing to clean up input specification for (1) heterogenous variables and (2) a limited version of 'sequence' specification Fix/scripts/cleanup (#539) updating documentation example pytests to verify all inpt values against specified input values updating documentation example typos Feat/transfer mechanism/add std output states (#538) refactoring system input state creation to create one system input state (and mapping projection) for each input state of each origin mechanism Feat/transfer mechanism/add std output states (#537) Fix/output states (#536) Refactor/transfer mechanism/mutiple output states (#535) updating transfer mech execute to check the type of its function and call it once or once per input state accordingly, plus Jon's instantiate_output_states reclassifying softmax as a 'NormalizingFunction' instead of a 'TransferFunction' so that we can easily identify transfer mechanism functions that should be executed separately for each input state use pytest fixture for registry reset in tests/naming to ensure it gets called renaming --> on TransferMechanism types in order to not overwrite Python built-in range Refactor/naming (#533) add download link for GilzenratModel.py updating kwta and recurrent transfer mech pytests to match new output shape cleaning up imports so test will run add values(), show(), and nice str/repr methods to InstanceDefaults move name assignment (in registry call) to before input_states arg handling in mechanism Revert "Refactor/mechanism/preprocess variable (#531)" updating transfer mechanism pytests to match new shape of output updating transfer mechanism to call its function separately for each input state (each element of variable); for now, integrator function still only executes once add shell classes to top-level psyneulink namespace correct bug that would cause specifying 3d arrays as default_variable to assign default_variable incorrectly add method to np.array-ify all elements within a list/array continuing to add pytests for input specification - stuck on verifying that the input specification worked via tools (e.g. call_after_trial) available to the user, because non primary input states are getting overwritten as None updating documentation for input specification -- adding tables of inputs on each trial with code snippets Fix/mechanism/ parse arg input states (#532) Increment version to 0.4.0 add more input_state spec tests to handle currently known combinations for setting default_variable Refactor/mechanism/preprocess variable (#531) Refactor/mechanism/preprocess variable (#530) Docs/state and projections/docstring revs (#529) correct bug in _parse_arg_input_states where a non-list argument wouldn't be made into a list before processing change behavior of _parse_state_spec to not populate the state dict with a variable if it's a ClassDefault updating noise validation to compare against entire variable (possibly multiple input states) and updating error messages in pytests to reflect these changes updating 'try_execute_param method to expect 2d variable and return 2d param updating pytests for input specification documentation examples to match the new documentation examples continuing to update docs for inputs to system revising the input specification docs to describe the rules in terms of matching the mechanim's variable - also making the convenience cases clearer removing references to timescale in run and system docs Fixed/state/ parse state spec/projection spec (#528) Refactor/distance metrics (#526) Docs/latex math (#525) Docs/intro materials (#524) continuing to add pytests to test new input specification rules updating some reporting statements to match the new form of inputs (dict) continuing to clean up input specification; running inputs first through a new method called _input_matches_variable which catches some numpy mistakes specific to input validation that slip through iscompatible Logo (#523) make self.name return unnamed .__class__ in case no name was set Docs/input state specs (#522) Fix/input state specs (#521) continuing to add pytests for testing input specifications updating process and system to handle the new execution_inputs dict that they receive from run consolidating and revamping input processing to get rid of any references to , repetitive code. still some clean up to do -- 5 pytests failing Fix/input state specs (#520) Fix/input state specs (#519) beginning to consolidate input validation because we no longer have phases and don't need to handle systems and processes differently -- 22 pytests failing Fix/input state specs (#518) using new EULER option on the LCControlMechanism in GilzenratModel in order to match original model adding validation requiring integration_method to either be RK4 or EULER adding 'integration_method' to LCControlMechanism so that user can switch between euler and rk4 integration for the built-in FHN function fixing some params to match matlab model; made it easier to swtich between high C and low C params switching FHNIntegrator to use euler integration scaling entire noise term by sqrt(dt) rather than scaling the standard deviation of the noise term by sqrt(dt) Naming/registry/default name 0 (#516) beginning to add in an exception which will allow the case where all mechanisms specify one input which is the same shape as their variable (i.e. no outer list for trials) hack mechanism to be able to accept instance_defaults.variable setup via input_states argument still trying to fix inputs cleaning up sytem unit tests to match new input spec (outer set of brackets representing trials required) cleaning up mechanism unit tests to match new input spec (outer set of brackets representing trials required move input_states spec tests in test_transfer_mechanism to new file update current input_state spec tests make test_transfer_mechanism tests use instance_defaults.variable instead of incorrect .variable Docs/state and projection (#515) remove uses of self.variable. (it is vestigial and maintained only for user inspection) rename duplicate transfer mech test to avoid overwrite adding input specification pytests to test_system in order to verify which input spec formats already work and build on this pull from devel Refactor/control and gating signals (#514) Import leabra and run leabra tests only if leabra module is available. Leabra wrapper prototype (#513) Fix/utilities/iscompatible final rev (#512) Fix/utilities/iscompatible (#511) rename System and Process to add _Base suffix in shellclasses.__all__ because of abf3e7e and 6b9e9a4 Clean up/registry/ register category (#508) Refactor/projection/connection specs (#507) Refactor/gating mechanism/ instantiate gating signal (#506) • Projection (#505) updating comments and error messages in _construct_stimulus_sets to reflect changes updating 3 recurrent transfer mech unit tests which used 'sequence format' of input specification for a process to use 'mechanism format' instead Refactor/projection/ instantiate sender (#504) Refactor/state and projection/clean up (#503) commenting out branch of _construct_stimulus_sets which parses inputs by the 'sequence format' rules -- seems safe to move entirely to mechanism format b/c all pytests use 'mechanism format' and new examples using 'sequence format' do not work weird hybrid prediction error mechanism fix typo in ObjectiveMechanism docstring causing weird documentation formatting avoid using module-level Mechanisms in unit tests to avoid possible conflicts Refactor/state and projection/unit tests bug fixes (#502) Refactor/state and projections/unit tests (#501) Refactor/state and projection/names and docs (#500) requiring version 1.4 of toposort moving imports to top of gilzenrat pytests file adding full gilzenrat model to pytests -- no comparison data to assert yet, just verifying that model can run without errors adding pytests that isolate the GilzenratTransferMechanism and moving FHNIntegrator test that recreates figure 2 from gilzenrat paper from integrator mechanism tests --> gilzenrat tests fixing up a few model values in the gilzenrat model -- behavior is not quit right -- and switching number_of_trials back to 1 Optimize registry duplicate naming adding progress statement ('% complete') to gilzenrat script implementing noise on LCAIntegrator and cleaning up unnecessary integrator function code (removing GilzenratIntegrator) replacing GilzenratIntegrator with LCAIntegrator (with rate=-1) in GilzenratTransferMechanism Refactor/state and projection/specification bug fix 2 (#495) Refactored instantiation of States and Projections (#494) updating mechanism pytests to reflect integrator_function shape change and removing extraneous transfer mechanism tests which returned arrays of mixed types indexing into the first element of the transfer mechanism's integrator_function result so that the shape passed to the transfer mechanism's function is the same as if integrator_mode were false add component module to main psyneulink package fold keywords into first level hierarchy, because some keywords aren't defined in Keywords.py and this is confusing skip notebook checkpoints in running notebook tests stop package-level __all__ assignments from accidentally overwriting the __all__ objects they used as bases fixing bug in NormalDist() function which was shifting the mean of the distribution fix link to the tutorial in docs that didn't get changed when tutorial/ directory was created correcting LCAIntegrator function to match the papers (since it represents a rate of change, we need to integrate over timesteps) and relaxing integrator rate param validation which was blocking variables of lengths > 1 Devel (#490) improving initial conditions by making first recurrent projections to recurrent mechanisms make sense given their starting values make Function_Base inherit its paramClassDefaults from its parent class Function instead of Component remove DefaultProcessingMechanism from component/__init__.py because it's an instantiation of a _Base class, and doesn't get used removing and re-adding gilzenrat transfer mechanism because name change did not seem to work updating value of LC control mechanism output before it runs to match initial previous value (had to do this in the gilzenrat script because of other LC control mechanism hacks, but left a placeholer in ControlMechanism for how to implement this more generally for any control mechanism that accumulates) adding a new Integrator function that matches the decision and response layer functions in the Gilzenrat paper, and a new transfer mechanism which calls this integrator before its primary function update README and docs index.rst to new PyPI installation instructions, and tutorial section, reorganize reformat README into .rst format so pypi can format it nicely update short description to match the title line in the long description update setup.cfg for wheel creation and to include license file update setup.py supported Python versions to include only 3.5 and 3.6 (does not work on < 3.4 due to numpy, does not work on 3.4) update setup.py classifier for Apache license add tutorial_requirements.txt mirroring setup.py requirements add requirements.txt mirroring setup.py requirements update setup.py packages add MANIFEST.in remove SOFTWARE ARCHITECTURE and TODO List remove extraneous files add docstrings to __init__.py files (for help command) update tutorial to new easier import style update docs to handle new module/package format update package __init__.py files for simple importing add __all__ lists to modules rename globals/run.py to globals/environment.py to avoid namespace conflict with run method clean up main package __init__.py replace paramClassDefaults PROJECTION_SENDER with OutputState class instead of keyword to prevent error due to failed conversion rework imports to avoid circularities due to packaging make LearningMechanism get its paramClassDefaults from its parent and not Projection_Base remove mechanism factory method remove system factory in favor of just instantiating System class remove process factory in favor of just instantiating Process class switch name of Process and Process_Base switch name of System and System_Base move typecheck for _get_modulated_param inside to avoid circular import remove old pyargs argument for pytest relaxing validation on LCAIntegrator rate param in order to create an LCA example in integrator mode with an array input cleaning up resolving merge conflicts fixing merge conflicts started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism starting TDDelta Function -- very messy 2 of 3 test working integrating td learning cleaning up Function.py for pull request tests working! Q-matrix initialization working; mechanism does not Added Q-learning and SARSA algorithm
kmantel
added a commit
that referenced
this pull request
Apr 5, 2018
* devel: Feat/mechanism/input target label dicts (#751) Scheduling: fix bug where termination conditions persisted across calls to run tests,function/LinearCombination: Add tests with absent parameters test,function/LinearCombination: Rename second test function to prevent overwriting results • Context (#746) Refactor/context/deprecate init status (#745) Refactor/context/structured (#744) Fix/function/stability (#743) • IntegratorMechanism (#742) Feat/context/time (#740) Feat/context/time (#739) Image Fix (#738) finally fixed image (#737) Image Fix (#736) Example Fix (#735) Linear combination fix (#734) Feat/component/execution count (#733) jvesely/linear_combination_function_refactor (#732) Refactor/project/context rev 2 (#731) Refactor/system/show graph structure options (#730) • System (#729) Feat/mechanism/show structure (#728) Feat/mechanism/show mechanism (#727) jvesely/linear_combination (#724) creating a property for TransferMechanism's integrator_mode so that the mechanism can switch integrator mode on and off Fix/function/udf examples (#722) • Function (#717) Refactor/function/udf (#716) Refactor/mechanism and output state/mech params dict added (#715) Docs/output state/clean up (#714) Clean up/function/softmax one hot (#713) Name/project/replace assign index calculate (#711) Fix/controlmechanism/assign as controller jdc (#705) Feat/function/one hot cleanup (#704) Feat/function/one hot (#703) adding a pytest for the clear_log method updating output of nparray_dictionary when there are no entries from None to an empty OrderedDict Tests/llvm devel sync (#684) removing show graph pdfs from tests folder revising the show_graph pytests to call '_get_label' as a proxy for whether show_graph with dimensions is working moving _get_label helper function outside of show_graph method, so that it can be accessed on its own fixing bug in show_graph(show_dimensions=True) by taking np.atleast_1d of output_state.value • LearningProjection docstring rev (to include error_function) Feat/process/learning objective mech (#698) Feat/ddm/selected input array (#697) Feat/ddm/selected input array (#695) user_params and function_params now look at parameter state values (rather than param base values), and are updated whenever mechanisms update their parameter states adding pytests that call show graph after creating various types of systems -- may refactor these to call the individual methods of show_graph removing system graph pdfs removing show_dimensions=True from call to show_graph in GilzenratModel because it generates an error updating how valus are retrieved from log in Nieuwenhuis model (based on addition of Pass to log) Fix/system/learning ends before terminal (#692) Fix/system/learning ends before terminal (#691) Revert "Merge branch 'master' into fix/system/learning_ends_before_terminal" - • ControlMechanism _instantiate_control_signals: debugged OWNER_VALUE assignment • Scripts/Examples Rumelhart Semantic Network: updated with step function • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • System _instantiate_learning_graph(): fixed bug in which learning failed to be instantiated for a System in which the last Mechanism in a learning sequence was not the TERMINAL Mechanism of the System. • OutputState docstring revs • OutputState docstring revs fixing documentation formatting mistake continuing to add pytests and doc fixes for clip on transfer mechanism types allowing lca to execute function over entire variable, not just first item fixing documentation for clip continuing to add error messages to reinitialize allowing smoothing factor to be an integer (formerly 1.0 and 0.0 were allowed but 1 and 0 were not) removing typecheck on learning mechanism's default_variable adding exception in UDF so that function can be called without params and context correcting error message for initial_value validation on transfer mechanism fixing bug in reinitialize on arrays (needed np.atleast_2d when setting intial_value because it is compared to variable) - • OutputState docstring revs Refactoring of OutputState to support flexible assignment of its variable attribute. Revert "-" Revert "-" Revert "-" - adding pytests for specific reinitialize cases that were not covered, and adding error messages that were missing for some of them - fixing documentation typo: integration_method was mistakenly called integration_method_FHN in docs - - - - - - Reworking Montague, Dayan, and Sejnowski model documentation. - Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state Merge branches 'bug/parsing/input_states-use-value' and 'feat/DDM/value_based_version_input_state' of https://github.com/PrincetonUniversity/PsyNeuLink into feat/DDM/value_based_version_input_state - - - - - - • Utilities - recursive_update(): added non-destructive option that preserves any non-empty entries in destination dict - - - • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() • OutputState this version implements OutputState.variable as a property that returns _parse_output_state_variable() - - - - - - adding pytests for invalid target specifcation to confirm that the proper error messages are generated • OutputState assign function now expects dict as argument - WORKING adding more pytests to confirm that convenience notations and combinations of function and list target specs all run documenting targets and adding some checks to adjust targets: verify that num_targets = num_inputs, and ignore num_targets in the case of function specifications (because a new value is generated on each trial) - - - - • OutputState - implemented assign that takes assign_params_dict as arg Fix/output state/assign backward compat (#676) • OutputState added backward compatibility docstring: document replacement of calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN in progress: refactoring function specification of target spec to be an option within the dictionary specification, rather than on its own • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN • Project, OutputState replace calcuate/CACULATE with assign/ASSIGN Feat/ddm/input state as array (#674) revising documentation for target specification cleaning up a typo in target_spec_parsing (comparator mechanism was referenced where it should have been terminal mechanism) moving call to _check_args in BackProp to before the error matrix is updated in order to avoid a validation bug adding pytests for target spec convenience notations adding run to rumelhart tests (previously only created systems) Merge branches 'clean_up/function_and_system/backprop_and_show_graph' and 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into clean_up/function_and_system/backprop_and_show_graph revising how target input state values are assigned in system's execute_learning adding a simple multilayer learning pytest refactor execute and _execute methods defaults: remove post-hoc conversion of defaults variable Component: don't convert defaults variable on calls to validate a variable parsing: add initial_value parser parsing: add generic argument parser used as default if none specified Component: add method to parse user inputted variable to useable/standard form utilities: handle nonuniform objects better when converting to numpy arrays control: refactor handling of allocation* projections: refactor sender instantiation to avoid directly setting instance default variable clean up input_states handler rename input_states arg parser to handler maint: add comments to separate handler, parsing, and validation methods maint: remove unused PROJECTION_SENDER_VALUE TransferMechanism: use standard form of setting default variable utilities: change number detection to accept any number, not just int and float OutputState: when variable not specified to constructor, pass up another value make self.variable read only (we should not be using it for logic) replace calls to self.variable to proper self.instance_defaults.variable validation: remove extraneous check for ClassDefaults.variable ClassDefaults: make RecurrentTransferMechanism default require 2d variable because it takes an AutoAssociativeProjection that uses a LinearMatrix that requires 1D Distance: fix validation assumption that items of passed variable are iterable ClassDefaults: correct and consolidate utilities: add method to produce a value for length calls when len() fails utilities: add function to determine whether something is iterable Integrators: handle initializer like variable in Components Function: standardize default_variable assignments ProcessingMechanism: use standard assignment of default variable DDM: use standard assignment of default variable ensure default_variable auto sets to dtype float combine handling of default_variable/size to create instance_defaults.variable in Component.__init__ utilities: allow list->array element conversion to typecast internal items validation: fix validate_variable crashes on certain variable types utilities: add helper method to determine if an object contains a single value rename variable->default_variable Clean up/function and system/backprop and show graph (#671) Clean up/learning/misc (#670) Clean up/learning/misc (#669) Clean up/learning/misc (#668) Fix/transfermechanism/noise function (#667) Fix/transfermechanism/clip (#666) Refactor/modulatory signals/linear default function (#665) Refactor/learning/heterovergent (#664) in progress - refactoring adjust_target_dict method to validate all candidate targets and confirm that all mechanisms provided the same number of targets Tests/mechanism/hebbian learning (#663) Docs/function/hebbian (#662) Docs/function/hebbian (#661) updating pytest expected values based on changes to log output adding Pass to log output and updating pytests accordingly Fix/learning/hebbian (#659) swapping all log references to 'simple_time' with the full 'time', and removing old code which handled time stamp duplicates in progress - refactoring target spec/validation to work the same way as input spec/validation renaming object --> component in _adjust_target_dict() updating pytests to match RecurrentTransferMech switch from full matrix to hollow matrix; changed expected output or set auto = 1 to preserve old expected output, depending on type of test setting default matrix of a RecurrentTransferMechanism to a hollow matrix, and updating docs to be clearer about how auto, hetero, and matrix combine/overwrite each other when multiple arguments are specified renaming object --> component in _validate_targets method to avoid shadowing python built-in updating pytest expected results to match increment change in log log pytest for a mechanism that is scheduled to run many times in a row changing increment size on log's time_step workaround temporary workaround for timestep values: incrementing first decimal of timestep revising log tests for new time_step notation temporary workaround for timestep values: incrementing first decimal of timestep revising parse_entries_for_time_values method on log so that it edits the time values in the log items directly, rather than maintaining a separate list of modified time values setting axis=1 on calls to np.sum and np.product in Reduce function and adding tests for this function documentation typos documenting reinitialize on mechanism continuing to add tests and docs for reinitialize fixing bugs that prevented initialize method on system from ever executing, and adding pytests for it now that it works revising outdated TransferMechanism docs for reinitialize continuing to add tests to highlight differences between calling reinitialize on a mechanisms and on a function adding nparray_dictionary to docs and revising nparray to use the same helper methods as nparray_dictionary Time: fix bug where RUN counter would not be incremented on new runs fixing (temporarily) time_step bug in nparray_dictionary; reorganzing nparray_dictionary into methods that can be reused by nparray refactoring log to have a dictionary option and writing tests for it beginning to add a dictionary alternative to the options for whats returned by the log more calls to _dealias_owner_name required in order to create log.nparray fixing bug in log: needed to switch between 'value' and mechanism name in several loops in order to assemble log.nparray - Feat/rl/for mads (#652) Feat/rl/for mads (#651) adding more pytests for reinitialize and fixing reinitialize bugs; beginning to update documentation adding pytests for reinitializing at both function and mechanism level; cleaning up mistakes in reinitialize() methods along the way Merge branch 'devel' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/Projection/Context_devel adding a reinitialize method on mechanisms, which calls reinitialize on its function or integrator_function, then updates the mechanism's value and output states beginning to refactor reinitialize as a method on integrator functions Removed Print Statements (#650) cleaning up documentation to match how LinearMatrix works in all cases typo in linear matrix function validation simplifying non-projection branch of validation on LinearMatrix function and adding more pytests default_variable: let argument override input_states variable spec if compatible adding pytests for possible combinations of variable and matrix specifications for LinearMatrix as a function of a mechanism adding validation comparing matrix to variable when LinearMatrix function is called by a mechanism; creating square full connectivity matrix that matches variable when matrix is not specified tutorial: reenable graph drawing; requires graphviz package tutorial: clear outputs Lena Program 1 Bugfix (#648) Hebbian learning fix (#647) User defined function updates (#646) adding working version of LinearMatrix function pytest (only works because default_variable is specified on both the mechanism and the function) fix input_states argparsing to not be dependent on default_variable or size args tests: ensure leabra tests get skipped if module is not available splitting linear matrix function's validation into two branches because matrix is handled differently when the function is called by a projection vs a receiver docstring wording change Docs/models/title changes (#645) Docs/nieuwenhuis/edits (#644) adding pytest for ProcessingMechanism with LinearMatrix function to begin debugging why this fn only works in Projections removing unrestrictedtransfermechanism file because this mechanism is now called ProcessingMechanism and does not need its own file adding parameter state docs examples back in with doctest SKIP revising proccessing mechanism docs because it is not an executable mechanism (not just an ABC) renaming UnrestrictedProcessingMechanism --> ProcessingMechanism and moving code into processingmechanism.py (which formerly only contained ProcessingMechanism_Base Leabra Update (#642) DDM: update is_finished to work on functions with any dimensional variable skipping transfer mechanism doc tests skipping transfer mechanism doc tests minor documentation changes -typos and formatting mistakes reorganizing integrator mechanism pytests for reinitialize overwriting AGTUtilityIntegrator's reinitialize property - requires custom reinitialization of short term and long term utility overwriting FHNIntegrator's reinitialize property - requires custom reinitialization of v, w, time, value overwriting reinitialize property on DriftDiffusion Integrator so that time can also be reset documenting reinitialize on all Integrator functions and fixing a typo in transfer mechanism docs (initial_value --> initializer) continuing to add docs and examples for reinitialize, and cleaning up TransferMechanism docs along the way fixing tutorial indexing bug refactoring is_finished as a property so that it is always up to date, even when values change in between executions (i.e. if threshold was crossed and then reinitialize was used) fixing bug in transfer mechanism documention examples (np.array typo) renaming reset_intializer --> reinitialize adding unrestricted mechanism pytests to confirm that mechanism can be constructed and executed with any function -- identified two exceptions (linear matrix and back prop) adding a new mechanism that has no restrictions on which functions can be used commenting out show graph lines in tutorial for now because graphviz is not imported on testing server adding updated version of tutorial from Justin Defaults*: fix class structure addressing bugs revising transfer mechanism documentation -- 'creating' section commenting out show_graph in EVC gratton pytest so that this line does not run on Jenkins adding TransferMechanism pytests to verify previous_value persists over multiple runs/executions AND previous_value resets whenever reset_initializer is used edited NieuwenhuisModel docs tutorial: remove old version - new version is in tutorial/ dir tutorial: support execution on mybinder.org tutorial: support execution on mybinder.org tutorial: remove old version - new version is in tutorial/ dir • Niewenhuis model - docstring edits - adding integrator_mode and integrator_function attr documentation for all transfer mechanism types revising outdated documentation for transfer mechanism noise fixed bug in plotting Nieuwenhuis Model updated Nieuwenhuis documentation adding attrs that were missing from LCA mechanism docs and revising related documentation Scripts: clean up Functions: add UniformToNormalDist to top-level psyneulink module; update docs revising explanation of user_params revising explanation of user_params revising parameter state documentation adding Markus' Nieuwenhuis documentation, plus figures and some .rst formatting Functions: replace internal calls to find owner's name with a property Component: make string version of *defaults classes be sorted removing parameter state example from file completely (tried commenting it out originally) removing parameter states example from documentation because it may be the reason parameter state tests are failing renaming 'Core Configurable Attributes' --> 'Core Structural Attributes' in Component documentation Refactor/system/controller (#627) Fix/controlmechanism/assign as controller (#625) • Log (#624) fixing typo in doctest (parameter state values) adding a docs example which walks through how a mechanism parameter and a function parameter and their mod_ versions change in value BogaczEtAl: use better numpy method for floating point warning handling utilities: update compatibility checker to terminate earlier in some cases updating modulation-related documentation to include mod_param and be more precise about what is updated by modulation (the parameter value used by a function changes, but the corresponding function attr does not change b/c it is the base value) adding documentation for mod_param allowing user to pass value into mod_param setter (even though setting is not allowed) in order to produce a more informative error message) commenting out noise and smoothing factor properties in transfer mechanism because these replace the default properties, causing unexpected behavior adding pytest to verify correct error message when user tries to set to mod_param_name adding pytest to track changes in attr, _attr, mod_param_name, and userparams[param_name] values of Transfer Mechanism's configurable params when (1) param values are updated (2) mechanism is executed adding an exception to make_mod_param as a temporary fix for function-specific mod_param properties that stay on mechanism class when function changes fixing typo in AGTUtilityIntegrator cleaning up function.py and verifying that self.get_current_function_param is used in all functions (skipped learning functions for now) Fix/controlmechanism/assign as controller (#620) Fix/controlmechanism/assign as controller (#619) cleaning up recurrent transfer mechanism pytests and fixing bugs in asserts updating matrix setter to also set the projection's matrix parameter state's function's previous value uncommenting auto and hetero properties from auto associative projection so that setting auto and hetero directly on the projections works adding auto and hetero properties to recurrent transfer mechanism. Auto, hetero, and matrix setters now all update recurrent_projection's matrix parameter state's function's previous_value Fix/controlmechanism/assign as controller (#618) executing projection individually in tranfer mechanism's matrix-change pytest adding a matrix-change pytest for a mapping projection between two transfer mechanisms in order to isolate the matrix bug from auto/hetero properties Defaults: clean up method organization fixing shape typo in gilzenrat script fixing overly strict rate param validation that caused bug in cases where mechanism looks up parameter state value refactoring transfer mechanism to use get_current_mechanism_param() refactoring LCA to use get_current_mechanism_param() refactoring kwta's _kwta_scale() to rely on get_current_mechanism_param() adding get_current_mechanism_param method on mechanism base to try to look up parameter state value remove now-unused time_scale param from many objects (not in scheduling where it's still used) log doctests: ignore tests with inconsistent whitespacing removing auto and hetero assignments from params dict in recurrent transfer mechansim removing unnecessary auto and hetero code in auto associative projection to clean up the relationship between the recurrent projection, its mechanism, and the auto, hetero, and matrix, attrs requiring _kwta_scale method to use k_value parameter state value when available commenting out calssPreferences in transfer mechanism because they cause bugs in KWTA when classPreferences try to update removing attempt to look up recurrent projection's matrix in matrix getter (because the recurrent projection looks up its owner's matrix) refactoring matrix getter on auto associative projection to look up owner's matrix whenever possible directly updating auto and hetero attrs at the same time that their parameter states are created in the auto specified, hetero = None and hetero specified, auto = None cases beginning to refactor auto/hetero/matrix handling to fit with new parameter state value and make_property changes; beginning by removing obsolete code in recurrent transfer mechanism removed CentralClock from MontagueDayanSejnowski96.py fixed typo in owner attribute description Fix/function/validate params (#616) Defaults: set up structure to allow proper aliasing for *Defaults classes - Renamed MontagueModel.py to MontagueDayanSejnowski96.py - Correct RST formatting in PredictionErrorMechanism docs - Added Arguments and Attributes to docs for PredictionErrorMechanism LinearCombination: rework check for division by zero error to be more general default_value: refactor into instance_defaults Component: add metaclass for *Defaults to allow some user convenience functionality Refactor/control signal/update to intensity (#613) Fix/component/intensity and value (#612) Fix/gilzenrat model/prefs bug (#611) updating DDM mechanism to get threshold using get_current_function_param method when it uses threshold to determine decision variable continuing to update how parameters are accessed in pytests (should be mod_ now in many cases) replacing .matrix with .mod_matrix in learning pytests adding a call to super in projection's _instantiate_attributes_after_function so that it calls make_property_mod (on component) Fix/ddm/threshold validation (#610) calling get_current_function_param in the remaining functions and fixing small bugs along the way (missing keyword for 'gamma', np.atleast_2d(rate) in lcaintegrator) moving make_property_mod back to component.py (from parameterstate.py) -- it is now called for all parameter states during _instantiate_attributes_after_function rather than by individual parameter states Docs/td learning/doc fixes (#609) removed show graph call from test_reinforcement resetting test_multilayer from devel and removing matplotlib from test_prediction_error_delta_function specifying smoothing_factor=1.0 on pytests that used to use default smoothing_factor (1.0 --> 0.5) changing smoothing factor (formerly time_constant) default value to 0.5 -- it was confusing to users that the default param value prevented integration renaming 'time_constant' --> 'smoothing_factor' on TransferMechanism types that use AdaptiveIntegrator Fix/log/trial and run (#607) Feat/log/trial and run (#606) Refactor/project/learning vs executing (#605) correcting capitalization cleaning up documentation adding asserts to parameter states pytests in order to start tracking down bug where mod_noise looks up the parameter state value of the last instance created Refactor/mechanism/value in execute 2 (#603) predictionerrormechanism docs: move gilzenrat svg files from build dir to source dir Fix/log/tuple datum value (#601) registry: handle case where default-named projection to a duplicate named mechanism would incorrectly detect the projection name as a duplicate finished TD Learning documentation Fix/state/matrix spec and learning (#600) Fix/component preference set/class preferences (#598) Fix/log/set log conditions bug (#596) updating Transfer functions (Linear, Logistic, Exponential) to use get_current_params(KEYWORD) instead of paramsCurrent[KEYWORD] adding get_current_param method which tries to return mod_param and returns param if that doesn't exist -- will eventually be added to all functions, starting here with DriftDiffusionIntegrator Docs/log/hint (#595) updating shape inconsistencies in DriftDiffusionIntegrator / DDM Mechanism related to time and threshold removing special handling of DriftDiffusionIntegrator threshold in variable=array case (correct behavior is ambiguous) docs: add extra sub-version number in version display utilities: enhance method to recursively convert items to np.ndarray, handling hard cases for np.array remove scratch pad and ignore Docs/log/log clean up (#593) Docs/log/log clean up (#592) remove scratch pad Docs/log/log clean up (#591) Names/log/set log conditions (#590) adding pytests to verify that threshold and is_finished work as expected; commenting out tests with DriftDiffusionIntegrator and len(default_variable) > 1 because correct behavior is ambiguous (for now) adding 'threshold' param on DriftDiffusionIntegrator which stops accumulation at the threshold, and updated DDM's is_finished to look at this updating shape of time computation in FHN integrator (was list, now float) updating gilzenrat pytest which was checking _gain and gain to verify modulation to now use gain and mod_gain updating pytests and adding comments to possibly fix shape of ddm time value, which changed from a list to a float after property refactoring add realtime timestamps to Scheduler, for creation time and end of last RUN time change usages of now defunct times attribute of Schedulers to new version updating mod_param_name property creation to happen at the instance level in both cases (formerly created on mechanism classes) unindenting misplaced setting of _param_name attributes Bugfixes (#588) setting _param_name for all param_names that go through _validate_params resolves SOME of the cases where getter looks for _param_name before setter creates an _ attr Feat/log/add entry (#587) Fix/log/log initialization (#586) Feat/log/clean up (#585) Feat/log/clean up (#584) Feat/feat log with time (#583) rename psyneulink.scheduling.timescale -> psyneulink.scheduling.time create and integrate a new Clock class, and several new classes to keep time, used in Scheduler and Conditions adding _param_name to script for better output comparison with older versions (when _ stored the base value) solving bug where _param_name did not exist on TransferMechanism instances, but introduced new bug where last param value that was set is starting param value of next instance remove old Clock/CentralClock debugging make property execution main documentation for PredictionErrorMechanism done adding mod_slope to the current parameter state pytests adding make_property_mod method to parameter states -- executed at the end of _instantiate_parameter_state method and creates a property called mod_param_name on each param that has a parameter state which looks up the current parameter state value limiting make_property's resposibility to validation -- setter runs validation and then sets to _param_name, getter returns _param_name. mod_param_name property will handle getting parameter state value Feat/log/log levels (#580) test beginning to separate make property into two methods added PredictionErrorDeltaFunction and docs for PredictionErrorMechanism & Montague model Refactor/log/entry management (#579) montague models working! Docs/log/docstring update (#578) Add integrator function tests Add transfer function tests Add distance function tests function: test for both 1d and 2d noise setup.cfg: Use warmup if benchmarks are enabled setup.cfg: Disable benchmarks by default pytest: Add benchmarking plugin Fix/log/logged items bug (#577) using UniformToNormalDist pytest as a check of the scipy requirement error message adding documentation for UniformToNormalDist validating uniform-to-normal distribution function (matlab) Docs/log/docstring update (#572) adding gilzenrat figures in _build file adding pytest file for parameter states Name/log/numpy array to nparray (#571) Feat/mechanism/additional props (#570) Feat/log (#569) EVCAuxiliary: replace kwargs function signatures with explicit arguments add docstring explanation for processing and learning termination conditions Feat/log (#568) adding LC Control Mechanism test to verify that it is updating multiplicative param(s) of modulated mechanism(s) properly fix incorrect construction of Process and System in Multitasking example script Feat/log (#565) Feat/log (#564) almost working! add travis config file single source package requirements fixed error message in LinearMatrix adding a pytest for the new uniform --> normal distribution function fixed sample input updating recurrent transfer mechanism and transfer mechanism documentation • State - _validate_variable: removed: if not context: context = kwAssign + ' Base Value' else: context = context + kwAssign + ' Base Value' Fix/component/default naming (#558) remove Scratch Pad clean up DDM examples with verified parameters from matlab skip NavarroAndFuss doctest because build server cannot access matlab update NavarroAndFuss to use the correct version of the MATLAB simulation convert DDM return_value for NavarroAndFuss function to be floats to allow NaN assignment fix bug in using the matlab engine to run a script outside of the current dir adding validation on NormalDist function in the case where some numpy versions throw an error • System (#556) adding new UniformToNormalDist function which allows for a direct comparison of random numbers between python and matlab Feat/system/show graph (#555) adding integration_method to FHNIntegrator docs and refining error message Fix/modulatory specifications (#554) clean imports in function.py commenting out assertions in OU integrator pytests until its equation is validated fixing mistake in implementation of OUIntegrator adding LCAIntegrator docs to function docs page and continuing to touch up typos and incorrect info throughout function docs continuing to add documentation for LC Control Mechanism params adding matlab and psyneulink plot svgs adding pnl and matlab plots plus some additional notes to the Gilzenrat Model page of the documentation fixing typos in FHNIntegrator docs documenting the LCControl mechanism parameters that hand values off to the FHNIntegrator as well as scaling_factor_gain and base_value_gain cleaning up FHNIntegrator docs with tables for explaining parameters and latex equations typos in run (input spec) docs cleanup Scheduler doc examples add parsing handler for Scheduler termination_conditions move static .svg files from docs build directory to source dir update docs to show 0.0.x versions instead of just 0.x (we use the former frequently) fix broken package link for AutoAssociativeMechanism that caused sphinx automodule to fail removing references to 'inhibition' and 'decay' in LCA docs removing gilzenrat transfer mechanism from the repo updating gilzenrat unit tests to use LCA mechanism in place of GilzenratTransferMechanism fix bug where versioneer wasn't available at the correct time in building docs adding a note about the recurrent matrix to LCA docs rewriting gilzenrat model in terms of LCA rather than 'GilzenratTransferMechanism' removing LCA pytest from recurrent transfer pytests file now that LCA has its own tests updating LCA documentation -- removing beta & inhibition, adding leak, competition, and self_excitation.: setting default values for new LCA params adding pytest file for LCA and testing length 1 variable and length 2 variable cases added output_states param to call of PredictionErrorMechanism constructor added default variable param to call to LinearCombination in PredictionErrorMechanism adding 'leak' parameter and renaming 'auto'-->'self_excitation' and 'hetero'-->'competition' on LCA mechanism Refactor/state/doc test bugs (#551) fix bug where invalid escape strings in docstrings would cause failure on python 3.6.x fixing incorrect documentation of LCA (did not reflect new LCAIntegrator function) continuing to clean up Gilzenrat model and its model-specific components -- verifying that all arguments are consistent and correctly documented manually setting outputstate variable size adding params for G and k to LCControl mechanism as a temporary solution for allowing the user to modify the equation that computes gain as a function of w cleaning up gilzenrat script comments and labeling all params from the paper tried manually setting OutputState value for PEM -- didn't work Refactor/state/ parse state specs lots (#550) use versioneer for single-source versioning adding Gilzenrat changes from Markus fixed target size for PredictionErrorMechanism trying to fix tests correct W293 instances fix bug where intra-numpy-array list->array element conversion would fail on 0-d numpy array input updating logistic function and its documentation to match the more standard form, with an optional 'offset' to take the place of original 'bias' param. Updating all pytests that used what was formerly 'bias' and is now 'offset' trying more things to get td learning working clean up leabra demo script clean up leabramechanism add __all__ to leabramechanism and update relevant package rename certain leabra-specific functions to include "leabra" in preparation for adding to top-level namespace remove unnecessary (and oddly expensive) logging in scheduler fix bug where over/underflows in logistic functions would cause the result to be replaced with 0 (often incorrect format and destructive) remove forced error on warnings Leabra script cleaning (#547) cleaned up Matlab scripts & EVC Gratton example script (#546) Docs/project/more docstring fixes (#545) Docs/project/more fixes (#544) Docs/project/fixes (#543) reformat Example scripts to new import style, and clean up setup Scripts/Examples folder with desired scripts remove old/undesired scripts adding input spec figures to run documentation rename _get_matrix to get_matrix Revert "Fix/scripts/cleanup (#539)" commenting out all clip (formerly range) code because it does not work as expected fixing formatting typo in documentation continuing to clean up input specification for (1) heterogenous variables and (2) a limited version of 'sequence' specification Fix/scripts/cleanup (#539) updating documentation example pytests to verify all inpt values against specified input values updating documentation example typos Feat/transfer mechanism/add std output states (#538) refactoring system input state creation to create one system input state (and mapping projection) for each input state of each origin mechanism Feat/transfer mechanism/add std output states (#537) Fix/output states (#536) Refactor/transfer mechanism/mutiple output states (#535) updating transfer mech execute to check the type of its function and call it once or once per input state accordingly, plus Jon's instantiate_output_states reclassifying softmax as a 'NormalizingFunction' instead of a 'TransferFunction' so that we can easily identify transfer mechanism functions that should be executed separately for each input state use pytest fixture for registry reset in tests/naming to ensure it gets called renaming --> on TransferMechanism types in order to not overwrite Python built-in range Refactor/naming (#533) add download link for GilzenratModel.py updating kwta and recurrent transfer mech pytests to match new output shape cleaning up imports so test will run add values(), show(), and nice str/repr methods to InstanceDefaults move name assignment (in registry call) to before input_states arg handling in mechanism Revert "Refactor/mechanism/preprocess variable (#531)" updating transfer mechanism pytests to match new shape of output updating transfer mechanism to call its function separately for each input state (each element of variable); for now, integrator function still only executes once add shell classes to top-level psyneulink namespace correct bug that would cause specifying 3d arrays as default_variable to assign default_variable incorrectly add method to np.array-ify all elements within a list/array continuing to add pytests for input specification - stuck on verifying that the input specification worked via tools (e.g. call_after_trial) available to the user, because non primary input states are getting overwritten as None updating documentation for input specification -- adding tables of inputs on each trial with code snippets Fix/mechanism/ parse arg input states (#532) Increment version to 0.4.0 add more input_state spec tests to handle currently known combinations for setting default_variable Refactor/mechanism/preprocess variable (#531) Refactor/mechanism/preprocess variable (#530) Docs/state and projections/docstring revs (#529) correct bug in _parse_arg_input_states where a non-list argument wouldn't be made into a list before processing change behavior of _parse_state_spec to not populate the state dict with a variable if it's a ClassDefault updating noise validation to compare against entire variable (possibly multiple input states) and updating error messages in pytests to reflect these changes updating 'try_execute_param method to expect 2d variable and return 2d param updating pytests for input specification documentation examples to match the new documentation examples continuing to update docs for inputs to system revising the input specification docs to describe the rules in terms of matching the mechanim's variable - also making the convenience cases clearer removing references to timescale in run and system docs Fixed/state/ parse state spec/projection spec (#528) Refactor/distance metrics (#526) Docs/latex math (#525) Docs/intro materials (#524) continuing to add pytests to test new input specification rules updating some reporting statements to match the new form of inputs (dict) continuing to clean up input specification; running inputs first through a new method called _input_matches_variable which catches some numpy mistakes specific to input validation that slip through iscompatible Logo (#523) make self.name return unnamed .__class__ in case no name was set Docs/input state specs (#522) Fix/input state specs (#521) continuing to add pytests for testing input specifications updating process and system to handle the new execution_inputs dict that they receive from run consolidating and revamping input processing to get rid of any references to , repetitive code. still some clean up to do -- 5 pytests failing Fix/input state specs (#520) Fix/input state specs (#519) beginning to consolidate input validation because we no longer have phases and don't need to handle systems and processes differently -- 22 pytests failing Fix/input state specs (#518) using new EULER option on the LCControlMechanism in GilzenratModel in order to match original model adding validation requiring integration_method to either be RK4 or EULER adding 'integration_method' to LCControlMechanism so that user can switch between euler and rk4 integration for the built-in FHN function fixing some params to match matlab model; made it easier to swtich between high C and low C params switching FHNIntegrator to use euler integration scaling entire noise term by sqrt(dt) rather than scaling the standard deviation of the noise term by sqrt(dt) Naming/registry/default name 0 (#516) beginning to add in an exception which will allow the case where all mechanisms specify one input which is the same shape as their variable (i.e. no outer list for trials) hack mechanism to be able to accept instance_defaults.variable setup via input_states argument still trying to fix inputs cleaning up sytem unit tests to match new input spec (outer set of brackets representing trials required) cleaning up mechanism unit tests to match new input spec (outer set of brackets representing trials required move input_states spec tests in test_transfer_mechanism to new file update current input_state spec tests make test_transfer_mechanism tests use instance_defaults.variable instead of incorrect .variable Docs/state and projection (#515) remove uses of self.variable. (it is vestigial and maintained only for user inspection) rename duplicate transfer mech test to avoid overwrite adding input specification pytests to test_system in order to verify which input spec formats already work and build on this pull from devel Refactor/control and gating signals (#514) Import leabra and run leabra tests only if leabra module is available. Leabra wrapper prototype (#513) Fix/utilities/iscompatible final rev (#512) Fix/utilities/iscompatible (#511) rename System and Process to add _Base suffix in shellclasses.__all__ because of abf3e7e and 6b9e9a4 Clean up/registry/ register category (#508) Refactor/projection/connection specs (#507) Refactor/gating mechanism/ instantiate gating signal (#506) • Projection (#505) updating comments and error messages in _construct_stimulus_sets to reflect changes updating 3 recurrent transfer mech unit tests which used 'sequence format' of input specification for a process to use 'mechanism format' instead Refactor/projection/ instantiate sender (#504) Refactor/state and projection/clean up (#503) commenting out branch of _construct_stimulus_sets which parses inputs by the 'sequence format' rules -- seems safe to move entirely to mechanism format b/c all pytests use 'mechanism format' and new examples using 'sequence format' do not work weird hybrid prediction error mechanism fix typo in ObjectiveMechanism docstring causing weird documentation formatting avoid using module-level Mechanisms in unit tests to avoid possible conflicts Refactor/state and projection/unit tests bug fixes (#502) Refactor/state and projections/unit tests (#501) Refactor/state and projection/names and docs (#500) requiring version 1.4 of toposort moving imports to top of gilzenrat pytests file adding full gilzenrat model to pytests -- no comparison data to assert yet, just verifying that model can run without errors adding pytests that isolate the GilzenratTransferMechanism and moving FHNIntegrator test that recreates figure 2 from gilzenrat paper from integrator mechanism tests --> gilzenrat tests fixing up a few model values in the gilzenrat model -- behavior is not quit right -- and switching number_of_trials back to 1 Optimize registry duplicate naming adding progress statement ('% complete') to gilzenrat script implementing noise on LCAIntegrator and cleaning up unnecessary integrator function code (removing GilzenratIntegrator) replacing GilzenratIntegrator with LCAIntegrator (with rate=-1) in GilzenratTransferMechanism Refactor/state and projection/specification bug fix 2 (#495) Refactored instantiation of States and Projections (#494) updating mechanism pytests to reflect integrator_function shape change and removing extraneous transfer mechanism tests which returned arrays of mixed types indexing into the first element of the transfer mechanism's integrator_function result so that the shape passed to the transfer mechanism's function is the same as if integrator_mode were false add component module to main psyneulink package fold keywords into first level hierarchy, because some keywords aren't defined in Keywords.py and this is confusing skip notebook checkpoints in running notebook tests stop package-level __all__ assignments from accidentally overwriting the __all__ objects they used as bases fixing bug in NormalDist() function which was shifting the mean of the distribution fix link to the tutorial in docs that didn't get changed when tutorial/ directory was created correcting LCAIntegrator function to match the papers (since it represents a rate of change, we need to integrate over timesteps) and relaxing integrator rate param validation which was blocking variables of lengths > 1 Devel (#490) improving initial conditions by making first recurrent projections to recurrent mechanisms make sense given their starting values make Function_Base inherit its paramClassDefaults from its parent class Function instead of Component remove DefaultProcessingMechanism from component/__init__.py because it's an instantiation of a _Base class, and doesn't get used removing and re-adding gilzenrat transfer mechanism because name change did not seem to work updating value of LC control mechanism output before it runs to match initial previous value (had to do this in the gilzenrat script because of other LC control mechanism hacks, but left a placeholer in ControlMechanism for how to implement this more generally for any control mechanism that accumulates) adding a new Integrator function that matches the decision and response layer functions in the Gilzenrat paper, and a new transfer mechanism which calls this integrator before its primary function update README and docs index.rst to new PyPI installation instructions, and tutorial section, reorganize reformat README into .rst format so pypi can format it nicely update short description to match the title line in the long description update setup.cfg for wheel creation and to include license file update setup.py supported Python versions to include only 3.5 and 3.6 (does not work on < 3.4 due to numpy, does not work on 3.4) update setup.py classifier for Apache license add tutorial_requirements.txt mirroring setup.py requirements add requirements.txt mirroring setup.py requirements update setup.py packages add MANIFEST.in remove SOFTWARE ARCHITECTURE and TODO List remove extraneous files add docstrings to __init__.py files (for help command) update tutorial to new easier import style update docs to handle new module/package format update package __init__.py files for simple importing add __all__ lists to modules rename globals/run.py to globals/environment.py to avoid namespace conflict with run method clean up main package __init__.py replace paramClassDefaults PROJECTION_SENDER with OutputState class instead of keyword to prevent error due to failed conversion rework imports to avoid circularities due to packaging make LearningMechanism get its paramClassDefaults from its parent and not Projection_Base remove mechanism factory method remove system factory in favor of just instantiating System class remove process factory in favor of just instantiating Process class switch name of Process and Process_Base switch name of System and System_Base move typecheck for _get_modulated_param inside to avoid circular import remove old pyargs argument for pytest relaxing validation on LCAIntegrator rate param in order to create an LCA example in integrator mode with an array input cleaning up resolving merge conflicts fixing merge conflicts started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism started mini montague model adding comments first preliminary test working editing testing files and minor typos removed unnecessary identity transform function updating gitignore for new version of PyCharm created PredictionErrorMechanism starting TDDelta Function -- very messy 2 of 3 test working integrating td learning cleaning up Function.py for pull request tests working! Q-matrix initialization working; mechanism does not Added Q-learning and SARSA algorithm merge me
jdcpni
added a commit
that referenced
this pull request
Apr 13, 2018
* • IntegratorMechanism (#742) - added input_states and output_states to init and assign_args_to_params_dicts • LinearMatrix - keyword: fixed bug in which assignment of rows or cols could not handle scalars * Fix/function/stability (#743) * • IntegratorMechanism - added input_states and output_states to init and assign_args_to_params_dicts • LinearMatrix - keyword: fixed bug in which assignment of rows or cols could not handle scalars * • Function Stability: - function: add PROB_INDICATOR option that assigns a value of 1 to the probabilistically chosen option - _validate_params: moved call to super() to end to allow matrix param to be evaluated before continuing validation * Refactor/context/structured (#744) * - * - * - * - * - * - * - * - * - * - * - * - * - * - * • Log LogCondition - subset of ContextFlags used to specified logPref • Context ContextFlags - implemented as common set of context flags for: - initialization - execution tracking - logging ContextStatus - aliases to ContextFlags (for backward compatibility) * • Log LogCondition - subset of ContextFlags used to specified logPref • Context ContextFlags - implemented as common set of context flags for: - initialization - execution tracking - logging ContextStatus - aliases to ContextFlags (for backward compatibility) * • Log LogCondition - subset of ContextFlags used to specified logPref • Context ContextFlags - implemented as common set of context flags for: - initialization - execution tracking - logging ContextStatus - aliases to ContextFlags (for backward compatibility) * - * - * - * - * - * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * - * - * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * - * - * - * - * - * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * Refactor/context/deprecate init status (#745) * - * - * - * - * - * - * - * - * - * - * - * - * - * - * • Log LogCondition - subset of ContextFlags used to specified logPref • Context ContextFlags - implemented as common set of context flags for: - initialization - execution tracking - logging ContextStatus - aliases to ContextFlags (for backward compatibility) * • Log LogCondition - subset of ContextFlags used to specified logPref • Context ContextFlags - implemented as common set of context flags for: - initialization - execution tracking - logging ContextStatus - aliases to ContextFlags (for backward compatibility) * • Log LogCondition - subset of ContextFlags used to specified logPref • Context ContextFlags - implemented as common set of context flags for: - initialization - execution tracking - logging ContextStatus - aliases to ContextFlags (for backward compatibility) * - * - * - * - * - * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * - * - * • Context context.status replaced with specific field assignments (.initialization_phase, .execution_phase, and .source) * - * - * - * - * - * - * Merge branches 'devel' and 'refactor/context/structured' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/context/structured # Conflicts: # .idea/runConfigurations/Tests.xml # Scripts/McClure.py * Merge branches 'devel' and 'refactor/context/structured' of https://github.com/PrincetonUniversity/PsyNeuLink into refactor/context/structured # Conflicts: # .idea/runConfigurations/Tests.xml # Scripts/McClure.py * - * - * • Context - consolidated init_status into context.initialization_status * • Context - consolidated init_status into context.initialization_status * • Context - consolidated init_status into context.initialization_status * • Context (#746) - initialization_status.UNSET -> initialization_status.INITALIZING where appropriate - delete InitStatus class * test,function/LinearCombination: Rename second test function to prevent overwriting results Test names should indicate tested feature. Fixes: daebb62 ("Linear combination fix (#734)") Cherry-picked from devel-llvm: fdc686e * tests,function/LinearCombination: Add tests with absent parameters Cherry-picked from devel-llvm: 1dcca60 * Scheduling: fix bug where termination conditions persisted across calls to run * Feat/mechanism/input target label dicts (#751) * - * - * - * - * • Environment added _parse_input_labels() and _parse_target_labels() methods run(): modified to use _parse_input_labels and _parse_target_labels * • Environment added _parse_input_labels() and _parse_target_labels() methods run(): modified to use _parse_input_labels and _parse_target_labels * • Environment added _parse_input_labels() and _parse_target_labels() methods run(): modified to use _parse_input_labels and _parse_target_labels * - * - * - * - * - * • Mechanism added input_labels and output_labels propoerties added _get_state_value_labels() method * • Merged with devel * testing: correct pytest setup ovewrite, losing some settings * testing: Resolve leftover merge conflicts, fixes #747 * Feat/mechanism/input target lable dicts (#752) * - * - * - * - * • Environment added _parse_input_labels() and _parse_target_labels() methods run(): modified to use _parse_input_labels and _parse_target_labels * • Environment added _parse_input_labels() and _parse_target_labels() methods run(): modified to use _parse_input_labels and _parse_target_labels * • Environment added _parse_input_labels() and _parse_target_labels() methods run(): modified to use _parse_input_labels and _parse_target_labels * - * - * - * - * - * - * • Mechanism added input_labels and output_labels propoerties added _get_state_value_labels() method * • Merged with devel * • Environment _parse_input_labels(): added error messages * • Environment _parse_input_labels(): added error messages * • Environment Run: removed _parse_target_labels (they are just the input_labels for a TARGET Mechanism • Mechanism docstring revs for INPUT_LABELS_DICDT and OUTPUT_LABELS_DICT * • Environment Run: removed _parse_target_labels (they are just the input_labels for a TARGET Mechanism • Mechanism docstring revs for INPUT_LABELS_DICDT and OUTPUT_LABELS_DICT * - * - * - * - * - * • Component - _execute: added **kwargs argument, passed to call to function to accomodate LearningMechanism that uses this • AutoassociativeLearningMechanism - _execute calls super(LearningMechanism, self) to skip Learning • LearningMechanism: _ execute calls super()._execute with **kwargs * • Component - _execute: added **kwargs argument, passed to call to function to accomodate LearningMechanism that uses this • AutoassociativeLearningMechanism - _execute calls super(LearningMechanism, self) to skip Learning • LearningMechanism: _ execute calls super()._execute with **kwargs • PrecictionMechanism: _execute calls super()._execute * • Component - _execute: added **kwargs argument, passed to call to function to accomodate LearningMechanism and EVCControlMechanism, the functions for which expect additional arguments • AutoassociativeLearningMechanism - _execute calls super(LearningMechanism, self) to skip Learning • LearningMechanism: _ execute calls super()._execute with **kwargs • PrecictionMechanism: _execute calls super()._execute * • Component - _execute: added **kwargs argument, passed to call to function to accomodate LearningMechanism and EVCControlMechanism, the functions for which expect additional arguments • AutoassociativeLearningMechanism - _execute calls super(LearningMechanism, self) to skip Learning • LearningMechanism: _ execute calls super()._execute with **kwargs • PrecictionMechanism: _execute calls super()._execute
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added tests for linear combination
Bugfix for ProcessingMechanism: now initializes states correctly, added a basic test
Fixed a doc example