v0.15.2.0
[0.15.2.0] - 2024-11-11
Bug Fixes
-
Fix/ego_update_figs (#3108)
-
EGO CSW Model: update figures
CombineMeans
- Avoid creating unecessary object dtype for means
Component
- Only explicitly set new parameter defaults
- Check for existing parameter by name before getattr
- _initialize_parameters: allow creating Parameters dynamically
- _get_current_parameter_value: pass modulated=True to _get
- Always shallow copy owner
- Handle hybrid copy in deepcopy
- deepcopy remove no_shared in memo
- deepcopy add copy to memo
- Copy default variable if not passed to execute
- _validate_variable: copy default variable if used
- Copy matrix default value if used
- Store set of containing Compositions
- Rework size argument to accept and validate numpy shapes
Composition
- Inherit Parameters from parent class
- Fix bug storing results
- Do not delete value Parameter
- Remove compiled writeback of matrix during learning
CompositionInterfaceMechanism
- Use standard default_variable assignment
DDM
- Codestyle
DictionaryMemory
- Consolidate default entry creation
Documentation
- Fix table formatting
- Extend short title underlines
- Fix "strong" markup
- Fix literal markup
- Fix Inline emphasis markup
- Fix external links
- Fix inline interpreted markup
- Fix table vs. substitution conflict
- Fix basic rst formatting errors (#2958)
- Rename figure to match docstring reference (#3009)
- Add quotation to pip install (#3051)
- Use pattern rule to execute generator scripts (#3087)
DriftDiffusionAnalytical
- Specify dependence of bias on starting_value, threshold
DriftOnASphereIntegrator
- Fix initializer assignment
- Correct default initializer
EMComposition
- Reduce calls to memory_getter in init
EMStorageMechanism
- Add 'fields' as Parameter
- Do not set value in _execute
- Fix dot-notation access
- Explicitly update field_projection matrices
EMstorageMechanism
- Replace internal use of Parameter.get with _get
Function
- Copy variable on external .function call
- Do not process the value, or reset PRNG when syncing seed
Function_Base
- Don't catch and re-raise ValueError
IntegratorMechanism
- Correct broken size argument (#3046)
MDF
- Condition: handle np.number and np.array types as arguments
- Handle parameters/args in list and dict format
MaskedMappingProjection
- Also set matrix parameter port value
Mechanism
- Use np ones instead of list multiplication
- Copy defaults before executing with them
- Drop beartype decorator on internal function
OptimizationControlMechanism
- Correct non-stateful use of num_estimates
OptimizationFunction
- Make grid stateful
PECOptimizationFunction
- Make initial_seed shared and use context
Parameter
- Fix arg comment
- _set_default_value: add 'directly' to bypass parse/validate
- Bypass any setters when making uninherited
- deepcopy: always deepcopy non-inherited default_value
- Store source and final_source as self
- Faster contains
- getattr: call _parent fewer times
- Replace equivalent code with copy_parameter_value
- _set, _set_value: reformat arg list
- _set: make skip_delivery kwarg explicit
- On set, update compatible numpy arrays in place
ParameterEstimationComposition
- Make seed parameters shared
- Empty results on new run, not clear
ParameterPortList
- Reduce excess slow str formats
Parameters
- Clean up getter dev docs
- Check for alias using name
ParametersBase
- Cache names of attrs that do not exist
- Break throw_attr into separate method
- Do not getattr on parent for missing parameter attrs
ParametersTemplate
- Replace _children with WeakSet
- Add _params check in _is_parameter
Port
- Refactor is_modulated -> has_modulation
Projection_Base
- Copy sender default value if used as default
RecurrentTransferMechanism
- Make recurrent_projection a Parameter (#2940)
Refactor
-
Refactor/emcomposition_softmax_after_dot (#3095)
-
- emcomposition.py
- move softmax operation to after combining weighted dot products
- update use_gating_for_weighting and softmax CONTROL option to work with refactoring
- validate that use_gating_for_weighting is False when learn_field_weights is True
- docstring updates
-
Update Environment.py
-
test_emcomposition.py
- update test_execution
-
Refactor/linearmatrix_matrixtransform (#3101)
-
combinationfunctions(.py) -> transformfunctions(.py)
-
transferfunctions.py:
- rename LinearCombination as MatrixTransform and move to transformfunctions.py
-
transformfunctions:
- MatrixTransform: add operation parameter
-
recurrenttransfermechanism.py
- correct names for standard_outputports ENERGY and ENTROPY
-
lccontrolmechanism.py:
- add keywords for modulable fitzhugh-nagumo params
-
emcomposition.py:
- use MatrixTransform(operation=L0) w/o normalization for retrieval if len(key)==1
-
'EGO Model - CSW with Simple Integrator.py':
- Younes' script corrections, now functions propery!
Report
- Store report parameters on the instance instead of the class
SampleIterator
- Make generate_current_value instance-method-like
Scheduler
- Fix false add_condition replace warning (#3107)
StatefulFunction
- Correct previous_value shape with ragged variable
Testing
- Replace some assert == with numpy.testing.assert_array_equal
- Correct assert shape mismatch
- TestControlTimeScales: correct silent shape mismatch in results
- Check shape of results as well as the values
- Check shape of results as well as the values
- Use assert_array_equal to check array shape and values (#2922)
- Fix AVX512 detection on Numpy>=1.26 (#2932)
- Allow writeback on compiled tests.
- Remove result shape workaround
- Add test of dependency after DDM finished
- Control: split result assertions
- Auto test all numeric values wrapped in np array
- Add missing 'composition' marks (#2967)
- Narrow down the allowed exceptions in compilation fallback test
- Codestyle
- Use numpy prod instead of product
- Use fixture to preserve environment (#2987)
- Add leak check test (#2992)
- Remove leftover debug code
- Test show_graph in the leak test
- Fix show_graph leak and extend the leak test (#2997)
- Skip running ExecutionMode.LLVM instead of xfail
- Clarify failure in xfail test
- Cleanup some xfail tests (#2998)
- Adjust expected result based on scipy version
- Update OCM controller tests
- Use numpy arrays for fixed size arguments
- Use numpy arrays for fixed size arguments
- Use numpy arrays for fixed size arguments
- Use numpy arrays for fixed size arguments
- Cleanup
- Cleanup use of ExecutionMode.Python
- Cleanup
- Add llvm_not_implemented mark.
- Add llvm_not_implemented mark (#3075)
- Use issubclass to check Function class
- Convert dict test arguments to an immutable MappingProxyType
- Use MappingProxyType to pass dict test parameters (#3076)
- Drop unused ctypes import
- Use top level module import of ExecutionMode
- Drop unused import of core.llvm
- Comment out imports only used in commented out code
- Drop unused imports
- Drop unused imports (#3083)
- Move condition construction args to test parametrization
- Enable testing in per-node compiled mode
UserDefinedFunction
- Do not modify cust_fct_params attr on function call
- Rework creation of custom Parameters
- Use external Parameter.set for custom parameters
Broken_trans_deps
- Block beartype==0.17.1 (#2914)
Ci
- Split windows x86 job (#2943)
- Test-release: add --verbose to twine upload
- Test-release: use github cli to create github release
- Test-release: include python 3.10, 3.11, 3.12
Ci/ga
- Use native python architecture for macos python 3.8 job
- Use native python version on macos-arm64 runners (#2953)
- Simplify documentaitons ci jobs (#2957)
- Use single variable to check for self-hosted runners availability (#2965)
- Drop python-3.7 macos documentation build
- Require custom runners to have "enabled" flag (#2989)
Ci/ga/docs
- Use default python-architecture for each platform to build docs
- Represent correct os version in matrix.os
- Generate version matrix dimension based on GA event
Ci/github-actions
- Add python 3.12 docs building jobs
- Add python 3.12 jobs
Composition
- Create a copy of 'controller_condition'
Condition
- Add python interface from graph_scheduler
- Fix pnl-specific names in condition.py stub and all (#3089)
Conditions
- Add When alias for Condition
- Explicitly specify pnl Conditions in all
Conftest
- Clear graph scheduler cache in test teardown
- Inherit the original class of the benchmark fixture (#3093)
Dependabot
- Allow up to 25 open pull requests (#2944)
Deps/fastkde
- Bump minimum version to >=2.0.0
Fitfunctions
- Try using underscore name to construct fastKDE object
Function
- Replace FunctionOutputType.RAW_NUMBER with NP_0D_ARRAY
Functions
- Return numpy array as output for multi-item functions
Ga
- Move wheel/sdist creation to install-pnl action (#3085)
Llvm
- Move matrices of learnable projections to compiled state
- Move learnable matrices from RO params to RW params (#2933)
- Enable state writeback on all compiled Functions and Mechanisms (#2938)
- AutoassociativeProjection is a PNL param of the owning Mechanism (#2941)
- Add cleanup destruction check
- Consolidate construction and sync of compiled structures (#2973)
- Rearrange members of the Mersenne-Twister state structure
- Use int16 instead of int1 for flag in Philox state
- Use known type instead of int32_ty if available
- Codestyle
- Tweaks to structure layout and codestyle (#2994)
- Create numpy structures of all params/state before syncing to Parameters (#2995)
- Fix processing of enum values after compilation sync (#2996)
- Track and clear active CompExecution instances (#2999)
- Rename node_wrapper -> node_assembly
- Remove workaround, rename node assembly (#3016)
- Store only pointee types in byref_arg_types for pointer arguments (#3017)
- Construct numpy dtypes of compiled argument structures
- Move numpy buffer allocation to LLVMBinaryFunction
- Use numpy ndpointer for fixed size arguments of compiled functions (#3027)
- Remove support for running multiple contexts
- Remove 'wrap_call'
- Rename np_params -> np_arg_dtypes
- Use Numpy ndpointer by default
- Use Numpy ndpointer as default for pointer/array arguments (#3028)
- Use zero extend to promote integers
- Improve test coverage of compilation helpers (#3029)
- Use numpy array for dynamically sized output arguments (#3033)
- Use per jit-engine printf pointer
- Add env variable control over debugging output
- Control debug output via PNL_LLVM_DEBUG env var (#3092)
- Bring compiled scheduler implementation closer to the Python one (#3096)
- Drop PTXExec execution mode
- Use more aggressive optimizations for GPU target (#3109)
Llvm/Composition
- Add debugging output to scheduled node executions
Llvm/ConditionGenerator
- Use IntEnum to index the timestamp structure
Llvm/Functions/GridSearch
- Remove duplicate/dead code
- Use Numpy structures for fixed sizes arguments
Llvm/LLVMBinaryFunction
- Allow setting argument types to numpy ndpointer
- Enforce contiguous arrays as Numpy inputs
- Add support for dynamically sized inputs
Llvm/OneHot
- Codestyle cleanup
- Use sharp inequalities and unordered comparison
- Return absolute value in MIN_ABS_VAL mode
- Return first extreme value rather than the last (#3066)
Llvm/Scheduler
- Do not use precomputed locations of execution counts
Llvm/builder_context
- Remove used parameters workaround
- Merge conversion of lists and tuples
Llvm/cleanup
- Run GC only if needed
Llvm/codegen
- Factor out resetting of execution counts to a helper function
Llvm/compiler
- Use node num_executions to implement AllHaveRun condition
- Use TimeIndex enum to determine the size of the timestamp structure
Llvm/component
- Explicitly check for numpy array functions (#2905)
Llvm/cuda
- Always upload param structure to GPU mem
- Always download "data" buffer after GPU execution
- Download an free mutable GPU buffers after kernel execution
- Synchronize CPU and GPU buffers (#2969)
Llvm/execute
- Move cuda_execute for Function and Mechanism to FuncExecution
Llvm/execution
- Restrict writeback API to state structures
- Skip "ring_memory" parameter.
- Skip writeback of special RTM params
- Consolidate recursion points in writeback
- Use ctypes type in sizeof call
- Skip writeback of "optimizer" and "num_executions"
- Remove writeback condition parameter
- Make parameter and state writeback private
- Retrieve PNL parameter value only once
- Do stricter checks when reshaping synced parameters
- Covert compiled structures to numpy before sync to PNL params
- Cache both ctype and numpy compiled structures
- Cache numpy struct of execution conditions
- Remove byref calls
- Don't use wrap_call to execute "run"
- Use converted dtype to construct compiled numpy structures
- Use numpy structures for param, state and data arguments
- Use numpy structures for Function and Mechanism outputs
- Use numpy structures for Function and Mechanism inputs
- Use numpy structure for 'conditions' argument
- Use numpy structures for frozen values
- Use numpy structures to extract data
- Use numpy structure to insert output data
- Do not store ctype structure of frozen values
- Drop 'context' argument
- Use numpy structure for execution input
- Simplify and remove dead code
- Consolidate shared code between CPU and GPU 'run'
- Consolidate shared code between CPU and GPU 'evaluate'
- Use Context instance in the CompExecution constructor
- Use numpy arrays to return results of LLVM/PTX Run
- Use numpy arrays to return result of compiled evaluate
- Drop unused import
Llvm/execution/cuda
- Use numpy argument handlers to access compiled structures
- Use numpy arrays and arg handlers to extract results
- Create numpy stuructres for compiled input
- Drop upload/download counter
- Always use pycuda ArgumentHandler as cached buffer (#3010)
Llvm/execution/run
- Use numpy structures for input and execution counts
Llvm/gpu
- Use more aggressive optimizations for GPUs
Llvm/helpers
- Assert on invalid floating point conversion
- Always assume that the Treshold target is an array
- Assert if printf is not found
Llvm/scheduler
- Drop tracking of the number of node executions
- Assert that enabled controller uses TRIAL time scale
- Use position in consideration queue to honor data dependencies
- Move compiled scheduler to its own file
Llvm/thread_evaluate
- Reuse type-cast parameters (#2923)
Mdf
- Encode numpy functions the same as Python functions (#2909)
Parameters
- Sync numeric values with compiled structures
- On incompatible value, only delete necessary compiled struct
Requirements
- Bump pycuda to <2025 (#2902)
- Update numpy requirement from <1.24.5,>=1.21.0 to >=1.21.0,<1.25.3 (#2906)
- Update numpy requirement (#2904)
- Update llvmlite requirement from <0.42 to <0.43 (#2910)
- Update pytest requirement from <8.0.1 to <8.0.2 (#2917)
- Update grpcio requirement from <1.61.0 to <1.63.0 (#2919)
- Update pandas requirement from <2.2.1 to <2.2.2 (#2920)
- Update pytest requirement from <8.0.2 to <8.0.3 (#2921)
- Update matplotlib requirement from <3.7.3 to <3.7.6 (#2925)
- Update packaging requirement from <24.0 to <25.0 (#2926)
- Update pytest requirement from <8.0.3 to <8.1.2 (#2928)
- Update pytest-cov requirement from <4.1.1 to <5.0.1 (#2934)
- Update beartype requirement from <0.18.0 to <0.19.0 (#2949)
- Update torch requirement from >=1.8.0,<2.2.0 to >=1.8.0,<2.3.0 (#2950)
- Update torch requirement from >=1.8.0,<2.3.0 to >=1.8.0,<2.4.0 (#2951)
- Update pandas requirement from <2.2.2 to <2.2.3 (#2952)
- Update pillow requirement from <10.3.0 to <10.4.0 (#2954)
- Update networkx requirement from <3.3 to <3.4 (#2955)
- Update pytest requirement from <8.1.2 to <8.1.3 (#2956)
- Update pytest requirement from <8.1.3 to <8.2.1 (#2960)
- Update pytest-xdist requirement (#2959)
- Update grpcio requirement from <1.63.0 to <1.64.0 (#2961)
- Update grpcio requirement from <1.64.0 to <1.65.0 (#2970)
- Update pytest requirement from <8.2.2 to <8.2.3 (#2974)
- Update llvmlite requirement from <0.43 to <0.44 (#2978)
- Update pillow requirement from <10.4.0 to <10.5.0 (#2990)
- Update grpcio requirement from <1.65.0 to <1.66.0 (#3000)
- Update pytest requirement from <8.2.3 to <8.3.2 (#3004)
- Update pytest requirement from <8.3.2 to <8.3.3 (#3012)
- Set minimum scipy version to 1.7.3
- Update scipy requirement from <1.12 to <1.14
- Update scipy requirement from <1.14 to <1.15
- Update scipy requirements from <1.12 to >=1.7.3, < 1.14.0 (#3018)
- Update grpcio requirement from <1.66.0 to <1.67.0 (#3034)
- Update jupyter requirement from <1.0.1 to <1.1.1 (#3039)
- Update torch requirement from >=1.8.0,<2.4.0 to >=1.8.0,<2.5.0 (#3040)
- Update jupyter requirement from <1.1.1 to <1.1.2 (#3041)
- Update pytest requirement from <8.3.3 to <8.3.4 (#3045)
- Update pandas requirement from <2.2.3 to <2.2.4 (#3049)
- Update beartype requirement from <0.19.0 to <0.20.0 (#3050)
- Update dill requirement from <0.3.9 to <0.3.10 (#3054)
- Update pytest-pycodestyle requirement (#3061)
- Update pytest-pydocstyle requirement from <2.4.0 to <2.5.0 (#3064)
- Update networkx requirement from <3.4 to <3.5 (#3067)
- Update pillow requirement from <10.5.0 to <11.1.0 (#3070)
- Update grpcio requirement from <1.67.0 to <1.68.0 (#3072)
- Update pytest-profiling requirement from <1.7.1 to <1.8.1 (#3074)
- Update torch requirement from >=1.10.0,<2.5.0 to >=1.10.0,<2.6.0 (#3077)
- Update pytest-benchmark requirement from <4.0.1 to <5.1.1 (#3091)
- Update optuna requirement from <3.4.0 to <4.1.0 (#3042)
- Update pytest-cov requirement from <5.0.1 to <6.0.1 (#3097)
- Update fastkde requirement to <2.0.2
- Bump fastkde to 2.x (#3103)
Sampleiterator
- Store numeric attrs as numpy arrays
Setup
- Advertise support for python 3.12
- Convert PEP3118 size mismatch warnings to errors
Showgraph
- Make default subdirectory name consistent
- Rename default subdirectory
- Use pathlib to create output dirs instead of str append
- Do not store output files in site-packages
Treewide
- Use Python's all() instead of Numpy's alltrue
- Avoid some deprecated numpy constructs (#2913)
- Convert all external numeric parameter values into ndarray
- Change all internal non-torch numeric values to numpy array
- Remove numpy matrix references from docs
- Remove numpy matrix in favor of numpy ndarray
- Add space around operator in f-strings
- Qualify calls to itertools.product/combinations
- Qualify calls to
product
function (#2981) - Use ndarray.item() to convert single element numpy arrays to scalars (#3063)
- Allow Mapping type for 'params' in Component construction
- Rename Component arg size -> input_shapes
Utilities
- Convert_all_elements_to_np_array: fix crash on arr containing 0 dim arr
- Convert_all_elements_to_np_array: create fewer unnecessary internal arrays
- Add helper functions using numpy
- Add extended numpy array comparison function
- Copy_iterable_with_shared: handle weakref types
- Copy_iterable_with_shared: handle ContentAddressableList
- Is_iterable: simplify and allow option to exclude str
- Get_deepcopy_with_shared: handle object dict modification
- Contains_type: handle infinite recursion for numpy matrix
- Copy_iterable_with_shared: support numpy array
- Add update_array_in_place function
- Add array_from_matrix_string
Versioneer
- Updated embedded versioneer to 0.29