Releases: ruflab/shimmer
Releases · ruflab/shimmer
0.5.1
0.5.0
In this new update, we focused on bringing selection mechanisms to the Global Workspace!
It has seen his API polished and unified (some methods were removed because they were not used).
Version API docs:
https://bdvllrs.github.io/shimmer/v0.5.0/
What changed:
- Replace loss coef buffers by a
LossCoef
TypedDict. - Add
RepeatedDataset
to shimmer. - Add docs in
docs/
, API documentation in https://bdvllrs.github.io/shimmer/, and
some code examples. - Replace Black, isort, and flake8 with Ruff (see
#8). - Remove
GWInterfaces
entirely and favor giving encoders and decoders directly to the
GWModule
. See the updated exampleexamples/main_example/train_gw.py
to see what
changes to make (see #9). - Remove
GWModuleBase.translate
andGWModuleBase.cycle
. Translation and cycles
can now be done with the utils functiontranslation
andcycle
. - Remove
GlobalWorkspaceBase.batch_demi_cycles
,GlobalWorkspaceBase.batch_cycles
,
andGlobalWorkspaceBase.batch_translations
. This can be done with utils
functions of the same name. - Rename
GWModuleBase.fusion_mechanism
toGWModuleBase.fuse
,
GWModuleBase.encode
toGWModuleBase.encode_and_fuse
, and
GWModuleBase.encode_pre_fusion
toGWModuleBase.encode
. Same for the associated
methods inGlobalWorkspaceBase
. - Remove on_before_gw_encode_{loss} callbacks to allow sharing computation between
loss functions. - Remove many _with_uncertainty functions. The GWModuleWithUncertainty now behaves like
the other GWModules. - Rename all "with_uncertainty" methods to "bayesian". Note, BayesianGlobalWorkspaces
are still a work in progress. - Added selection mechanisms (inheriting from
SelectionBase
, see
docs)
to fuse representations according to different mechanisms (e.g. Attention). GlobalWorkspace
(and associatedGWModule
,GWLosses
, ...) now uses the
RandomSelection
mechanism. For the old behavior, use
GlobalWorkspace2Domains
.
Full Changelog: 0.4.0...v0.5.0
0.4.0
This release brings several breaking changes. Some renaming of classes, and removal of config functions.
- Use ABC for abstract methods.
- Replace
DomainDescription
withGWInterface
. - Add
contrastive_fn
attribute inDeterministicGWLosses
to compute the contrastive loss.
It can then be customized. - Rename every abstract class with ClassNameBase. Rename every "Deterministic" classes
to remove "Deterministic". - Remove all config related functions. This is not the role of this repo.
0.3.2
0.3.1
0.3.0
- Breaking change: remove
DeterministGlobaleWorkspace
andVariationalGlobalWorkspace
in favor of the functions:global_workspace
andvariational_global_workspace
. - Allow setting custom GW encoders and decoders.
- Breaking change: remove
self.input_dim
,self.encoder_hidden_dim
,
self.encoder_n_layers
,self.decoder_hidden_dim
, andself.decoder_n_layers
inGWModule
s.