Summary
This release refocuses the package on essential modeling components. Some modules and functionality has been deprecated or reworked since that functionality is better provided by a third-party. This policy shift will smoothen the road to a stable 1.0 release.
Breaking Changes
* Sub-classed models
* Designing and maintaining specific models for a given behavior is brittle and has high maintenance costs (e.g., Issue 14).
* Moving forward, specific behaviors are implemented as Keras `Layer`.
* The existing `Rank` and `Rate` models are now deprecated, but their functionality is easily reproduced using Keras subclassed `Model` or Functional API. Check out the updated tutorial and examples to see how.
* Variational inference should be implemented using an abstract class `psiz.keras.models.StochasticModel`. It closely follows TF `Model`, but adds repeated sampling of the batch axis.
* Layers
* The `RankBehavior` and `RateBehavior` similarity layers have been deprecated and will be removed in the next minor version. Use `RankSimilarity` and `RateSimilarity` layers instead.
* Data management strategy
* Deprecated `psiz.trials` module, use `psiz.data` module instead.
* The `psiz.trials` module was unintuitive and was expensive to maintain.
* Much of the functionality provided by the `psiz.trials` module has been redistributed to existing functionality outside of `psiz`, such as the versatile `tf.data.Dataset` pipeline.
* Hosting of previously collected datasets will now be handled by a new python package `psiz-datasets`.
* Model restarter logic
* Custom restarter logic has been removed since the functionality can mostly be achieved by other packages such as Keras Tuner. The subclassed callbacks originally added as a hack have been removed since they are no longer necessary (Issue 27 ).
* Removed `psiz.keras.Restarter` class
* Removed `psiz.utils.FitTracker` class
* Removed `psiz.keras.callbacks.EarlyStoppingRe` class
* Removed `psiz.keras.callbacks.TensorBoardRe` class
* Gating layers
* Subnet gating has been replaced with a new set of classes to enable enhanced features.
* Combined `psiz.keras.layers.Gate` and `psiz.keras.layers.GateMulti` functionality into a new class `psiz.keras.layers.BraidGate` to denote networks that separate and later rejoin. This new class can handle inputs that are a single tensor or a list. The internals of the new class have been re-worked to be cleaner, easier to understand, and more powerful.
* Added `psiz.keras.layers.BranchGate` to allow branching networks (networks that separate and do not rejoin).
* Repurposed `Gate` as a new class of the same name that represents an abstract class that performs gating. Both `BranchGate` and `BraidGate` inherit from `Gate`.
* Added a `GateAdapter` class which allows dependency injection for formatting a dictionary of Tensor inputs as a list of Tensors.
* Simulating behavior
* Deprecated `psiz.agents` module. Agent simulation functionality can easily be achieved with custom code. For an example, see `psiz/examples/rank/mle_1g.py`.
* Utility functions
* The `pairwise_similarity` function has been deprecated since users should create their own model.
* Nomenclature
* Embedding layers that receive stimulus indices are now referred to as `percept` rather than `stimuli`. This better reflects cognitive modeling semantics.
Changes
* Bumped TensorFlow version requirement to >=2.10 < 2.11 (and TensorFlow Probability to 0.18.0).
* Necessary because `Model` `get_config` has since been updated to address some issues that impact common PsiZ use cases.
* Refactored examples to reflect updated PsiZ best practice.
New Features
* Added foundational support for sequence modeling.
* Added a new `psiz.data` module that provides lightweight classes that serve as an intuitive on-ramp for marshaling data into a model-consumable format.