Skip to content

v0.2.1

Compare
Choose a tag to compare
@nmichlo nmichlo released this 04 Oct 23:53
· 530 commits to main since this release

Under the hood, quite a lot of code has been added or changed for this release, however the API remains very much the same.

Additions

  • Wrapped datasets, instances of disent.dataset.wrapper.WrappedDataset are datasets that have some sort of mask applied to them that hides the true state space and resizes the dataset.
    • disent.dataset.wrapper.DitheredDataset applies an n-dimensional dithering operation to ground truth factors
    • disent.dataset.wrapper.MaskedDataset applies some provided boolean mask over the dataset
  • disent.dataset.DisentDataset now supports wrapped datasets (instances of disent.dataset.wrapper.WrappedDataset). New methods and properties have been added to compliment this feature:
    • is_wrapped_data check if there is wrapped data
    • is_wrapped_gt_data check if there is wrapped data and the wrapped data is ground truth data
    • wrapped_data obtain the wrapped data, otherwise throw an error
    • wrapped_gt_data obtain the wrapped ground truth data, otherwise throw an error
    • unwrapped_disent_dataset creates a copy of the disent dataset with everything the same, except the data is unwrapped.
  • disent.util.lightning.callbacks additions
    • Support for wrapped datasets. They automatically try to unwrap them to obtain the ground truth data which can be used to compute metrics and perform visualisations.
    • Support model output scaling to a certain range of values, fixing visualisations when using VaeLatentCycleLoggingCallback
  • new utilities
    • disent.util.math.dither
    • disent.util.math.random
  • Self contained HDF5 ground-truth datasets. These store all the information needed to construct the dataset and state space in one file, including the factor names.
    • Added disent.dataset.data.SelfContainedHdf5GroundTruthData to read these files
    • Added disent.dataset.util.H5Builder for creating these files. (API is not yet finalised)
  • disent.dataset.util.StateSpace added helper function iter_traversal_indices
  • disent.nn.transform added ToUint8Tensor which acts like ToStandardisedTensor, but instead of loading images as float32, it loads them as uint8. This is useful when you need to use datasets outside of a ML Model context, eg. performing analysis. This takes up less memory.
    • corresponding functional version exists to_uint_tensor complimenting to_standardised_tensor
  • Begun work on a component & function registry, although do not use this as the API will change significantly.

API Breakages

  • Under the hood, implementing wrapped data and DisentDataset copying requires the ability to copy samplers, so each sampler implementation should have the uninit_copy method implemented too.
  • ArrayGroundTruthData is more strict about the observation_shape must be (H, W, C) or (C, H, W) depending on array_chn_is_last
  • Removed reconstruction losses:
    • ReconLossHandlerMse4 aka. "mse4"
    • ReconLossHandlerMae2 aka. "mae2"
  • Renamed disent.util.visualize.get_factor_traversal to get_idx_traversal

Deprecations

  • GroundTruthData property aliases:
    • img_shape new property for the deprecated observation_shape
    • obs_shape new property for the deprecated x_shape
    • img_channels new property for the number of channels in the image

Fixes

  • disent.util.inout.files.AtomicSaveFile minor fix to overwriting files
  • disent.util.lightning.callbacks.LoggerProgressCallback fix to datatypes and potential crashes due to floats
  • More stable experiment runs when performing sweeps. Better error handling, error messages and error catching.
  • fixes to the various requirement*.txt files
  • many other minor fixes