Important changes
- The sparse package is now an optional dependency to help easy installation on some platforms, if required, please install manually, e.g. `pip install sparse`
Breaking
- `targ_feats` argument in `HEPAugFoldYielder` renamed to `aug_targ_feats`
Additions
- `plot_feat` now shows a bar plot for categorical data
- `bootstrap_stats` added median computation
- `IdentBody` and `IdentTail` modules, which are placeholders for the body and tail modules in a network, for use when only a head is needed.
- `NodePredictor` a special `GraphCollapser` which provides a set of predictions per node in a graph, outputting either (batch x predictions x vertices) or (batch x vertices x predictions)
- `Ensemble` warns if no `ModelBuilder` is set when saving
- `agg_methods` argument for `GravNet`
- `absmax` aggregation method for `GravNet` and `GraphCollapser`
- 'hard_identity' function to replace lambda x: x when required
- `fold2foldfile`, `df2foldfile`, and `add_meta_data` can now deal with targets in the form of multi dimensional tensors, and convert them to sparse COO format
- `df2foldfile` now has the option to not shuffle data into folds and instead split it into contiguous folds
- Limited handling of PyTorch Geometric data: `TorchGeometricFoldYielder`, `TorchGeometricBatchYielder`, `TorchGeometricEvalMetric`
- Make `RunningBatchNorm` affine transformation optional
Removals
Fixes
- `proc_cats`
- Typo fix in `proc_cats` affecting the detection of categories in the testing data. (Thanks yaourtpourtoi)
- Doc string incorrectly stated that cat_maps mapped categories to codes, whereas it actually maps codes to categories
- `lr_find`
- Fixes to do with the number of batches to expect when running few number of folds than the `FoldYielder` contains.
- Correctly implements leave-one-out for the training folds
- renamed `n_folds` to `n_repeats` to more accurately reflect its role.
- `bootstrap_stats` corrected computation of central 68% CI: was `np.percentile(np.abs(points), 68.2)` now `(np.percentile(points, 84.135)-np.percentile(points, 15.865))/2`
- Error when trying to initialise `SEBlock2d` or `SEBlock3d`
- Fixed ipython display import to only run if in notebook
- Bug in multiclass-classification with on a batch of 1 data-point caused by targets being squeezed 2 dimensions, rather than 1.
- `tensor_is_sparse` argument for `df2foldfile` not functioning as expected
- Possible bug when applying data augmentation using `HEPAugFoldYielder` to target features, but not supplying target features when initialising the fold yielder
- Potential bug in `NodePredictor` when `f_final` is a `hard_identity` and `f_final_outs` is not None.
- `OffsetSelfAttention` missing from module `__all__`
- Possible bug when building ensembles from results caused by a misalignment between model index in results and model savename
- Require matplotlib <= 3.4.0
Changes
- `GravNetLayer` Self attention width corrected to `n_lr//4`, was previously `n_out//4`
- New PDPBox version finally released on PIP, so no longer requires separate installation, however PDPBox is now an optional dependency
- Relaxed version requirement on statsmodels
- Removed lambda expressions and locally defined function from NN code to make it compatible with the new torch package export method
- Extends Model training and inference to instantiate BatchYielders as prescribed by the FoldYielder, allowing users to provide their own BatchYielders in cases where data needs to be split in specific ways
- Optional plotting for some plot functions.
Depreciations
Comments
v0.8.0 - Mistake Not...
Important changes
- GNN architectures generalised into feature extraction and graph collapse stages, see details below and updated tutorial
Breaking
Additions
- `GravNet` GNN head and `GravNetLayer` sub-block [Qasim, Kieseler, Iiyama, & Pierini, 2019](https://link.springer.com/article/10.1140/epjc/s10052-019-7113-9)
- Includes optional self-attention
- `SelfAttention` and `OffsetSelfAttention`
- Batchnorm:
- `LCBatchNorm1d` to run batchnorm over length x channel data
- Additional `bn_class` arguments to blocks, allowing the user to choose different batchnorm implementations
- 1, 2, & 3D Running batchnorm layers from fastai (https://github.com/fastai/course-v3)
- `GNNHead` encapsulating head for feature extraction, using `AbsGraphFeatExtractor` classes, and graph collapsing, using `GraphCollapser` classes
- New callbacks:
- `AbsWeightData` to weight folds of data based on their inputs or targets
- `EpochSaver` to save the model to a new file at the end of every epoch
- `CycleStep` combines OneCycle and step-decay of optimiser hyper-parameters
- New CNN blocks:
- `AdaptiveAvgMaxConcatPool1d`, `AdaptiveAvgMaxConcatPool2d`, `AdaptiveAvgMaxConcatPool3d` use average and maximum pooling to reduce data to specified number sizes per channel
- `SEBlock1d`, `SEBlock2d`, `SEBlock3d` apply squeeze-excitation to data channels
- `BackwardHook` for recording telemetric data during backwards passes
- New losses:
- `WeightedFractionalMSE`, `WeightedBinnedHuber`, `WeightedFractionalBinnedHuber`
- Options for log x & y axis in `plot_feat`
Removals
- Scheduled removal of depreciated methods and functions from old model and callback system:
- `OldAbsCallback`
- `OldCallback`
- `OldAbsCyclicCallback`
- `OldCycleLR`
- `OldCycleMom`
- `OldOneCycle`
- `OldBinaryLabelSmooth`
- `OldBinaryLabelSmooth`
- `SequentialReweight`
- `SequentialReweightClasses`
- `OldBootstrapResample`
- `OldParametrisedPrediction`
- `OldGradClip`
- `OldLsuvInit`
- `OldAbsModelCallback`
- `OldSWA`
- `OldLRFinder`
- `OldEnsemble`
- `OldAMS`
- `OldMultiAMS`
- `OldBinaryAccuracy`
- `OldRocAucScore`
- `OldEvalMetric`
- `OldRegPull`
- `OldRegAsProxyPull`
- `OldAbsModel`
- `OldModel`
- `fold_train_ensemble`
- `OldMetricLogger`
- `fold_lr_find`
- `old_plot_train_history`
- `_get_folds`
- Unnecessary `pred_cb` argument in `train_models`
Fixes
- Bug when trying to use batchnorm in `InteractionNet`
- Bug in `FoldFile.save_fold_pred` when predictions change shape and try to overwrite existing predictions
Changes
- `padding` argument in conv 1D blocks renamed to pad
- Graph nets: generalised into feature extraction for features per vertex and graph collapsing down to flat data (with optional self-attention)
- Renamed `FowardHook` to `ForwardHook`
- Abstract classes no longer inherit from ABC, but rather have `metaclass=ABCMeta` in order to be compatible with py>=3.7
- Updated the example of binary classification of signal & background to use the model and training resulting from https://iopscience.iop.org/article/10.1088/2632-2153/ab983a
- Also changed the multi-target regression example to use non-densely connected layers, and the multi-target classification example to use a cosine annealed cyclical LR
- Updated the single-target regression example to use `WeightedBinnedHuber` as a loss
- Changed `from torch.tensor import Tensor` to `from torch import Tensor` for compatibility with latest PyTorch
Depreciations
- `OldInteractionNet` replaced in favour of `InteractionNet` feature extractor. Will be removed in v0.9
Comments