Skip to content

Tags: skorch-dev/skorch

Tags

v1.4.0

Toggle v1.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.4.0 (#1140)

- bump VERSION
- update CHANGES.md

v1.3.1

Toggle v1.3.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release v1.3.1 (#1129)

Quick patch release for sklearn v1.8 compatibility.

v1.3.0

Toggle v1.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.3.0 (#1124)

Bump version

Since torch 2.5 is dropped, we can assume that weights_only=True

No longer check for torch.compile availability, it's been available for
long enough

Unrelated to release: New pytest raises an error because of an incorrect
application of @pytest.mark.skipif, this was resolved

Unrelated to release: sacred import raises an error if pandas is not
installed, this is now token into account

v1.2.0

Toggle v1.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.2.0 (#1115)

# Version 1.2.0

This is a smaller release, most changes concern examples and development and thus don't affect users of skorch.

## Changed

- Loading of skorch nets using pickle: When unpickling a skorch net, you may come across a PyTorch warning that goes: "FutureWarning: You are using torch.load with weights_only=False [...]"; to avoid this warning, pickle the net again and use the new pickle file (#1092)

## Added

- Add Contributing Guidelines for skorch. (#1097)
- Add an example of hyper-parameter optimization using [Optuna](https://optuna.org/) [here](https://github.com/skorch-dev/skorch/tree/master/examples/optuna) (#1098)
- Add Example for Streaming Dataset(#1105)
- Add pyproject.toml to Improve CI/CD and Tooling (#1108)

Thanks @raphaelrubrice, @omahs, and @ParagEkbote for their contributions.

**Full Changelog**: v1.1.0...v1.2.0

Release commit specific:

* Bump verison to 1.2.0
* Update CHANGES.md
* Remove workarounds that have been fixed in sklearn
Only affects tests

v1.1.0

Toggle v1.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 1.1.0

Please welcome skorch 1.1.0 - a smaller release with a few fixes, a new notebook showcasing learning rate 
schedulers and mainly support for scikit-learn 1.6.0.

Full list of changes:

### Added

- Added a [notebook](https://github.com/skorch-dev/skorch/blob/master/notebooks/Learning_Rate_Scheduler.ipynb) that shows how to use Learning Rate Scheduler in skorch.(#1074)

### Changed

- All neural net classes now inherit from sklearn's [`BaseEstimator`](https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html). This is to support compatibility with sklearn 1.6.0 and above. Classification models additionally inherit from [`ClassifierMixin`](https://scikit-learn.org/stable/modules/generated/sklearn.base.ClassifierMixin.html) and regressors from [`RegressorMixin`](https://scikit-learn.org/stable/modules/generated/sklearn.base.RegressorMixin.html). (#1078)
- When using the `ReduceLROnPlateau` learning rate scheduler, we now record the learning rate in the net history (`net.history[:, 'event_lr']` by default). It is now also possible to to step per batch, not only by epoch (#1075)
- The learning rate scheduler `.simulate()` method now supports adding step args which is useful when simulation policies such as `ReduceLROnPlateau` which expect metrics to base their schedule on. (#1077)
- Removed deprecated `skorch.callbacks.scoring.cache_net_infer` (#1088)

### Fixed

- Fix an issue with using `NeuralNetBinaryClassifier` with `torch.compile` (#1058)

v1.0.0

Toggle v1.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
FIX New pytest version errors on warning test (#1056)

We had a test that basically called pytest.warns(None), which newer
pytest versions don't allow. Instead, now using recwarn to assert that
there is _no_ error.

The suggested
pytest.does_not_warn() (pytest-dev/pytest#9404)
does not appear to work.

v0.15.0

Toggle v0.15.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Release 0.15.0 (#1014)

* Update VERSION
* Remove code for backwards compatibility with v0.11
* Update CHANGES.md

Since skorch nets pickled with <= v0.11 can no longer be unpickled, I
added an entry on how to transition these pickle files.

Release text:

This is a smaller release, but it still contains changes which will be
interesting to some of you.

We added the possibility to store weights using safetensors. This can have
several advantages, listed here. When calling net.save_params and
net.load_params, just pass use_safetensors=True to use safetensors instead of
pickle.

Moreover, there is a new argument on NeuralNet: You can now pass
use_caching=False or True to disable or enable caching for all callbacks at
once. This is useful if you have a lot of scoring callbacks and don't want to
toggle caching on each individually.

Finally, we fixed a few issues related to using skorch with accelerate.

Thanks Zach Mueller (@ muellerzr) for his first contribution to skorch.

v0.14.0

Toggle v0.14.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Prepare release 0.14.0 (#985)

Release text:

This release offers a new interface for scikit-learn to do zero-shot and
few-shot classification using open source large language models (Jump right into
the example notebook).

skorch.llm.ZeroShotClassifier and skorch.llm.FewShotClassifier allow the user to
do classification using open-source language models that are compatible with the
huggingface generation interface. This allows you to do all sort of interesting
things in your pipelines. From simply plugging a LLM into your classification
pipeline to get preliminary results quickly, to using these classifiers to
generate training data candidates for downstream models. This is a first draft
of the interface, therefore it is not unlikely that the interface will change a
bit in the future, so please, let us know about any potential issues you have.

Other items of this release are

- the drop of Python 3.7 support - this version of Python has reached EOL and
  will not be supported anymore
- the NeptuneLogger now logs the skorch version thanks to AleksanderWWW
- NeuralNetRegressor can now be fitted with 1-dimensional y, which is necessary
  in some specific circumstances (e.g. in conjunction with sklearn's
  BaggingRegressor, see sklearn.ensemble.BaggingRegressor() #972); for this to
  work correctly, the output of the of the PyTorch module should also be
  1-dimensional; the existing default, i.e. having y and y_pred be
  2-dimensional, remains the recommended way of using NeuralNetRegressor

v0.13.0

Toggle v0.13.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Release 0.13.0 (#961)

Preparation for release of version 0.13.0

Release text:

The new skorch release is here and it has some changes that will be exiting for
some users.

- First of all, you may have heard of the [PyTorch 2.0
  release](https://pytorch.org/get-started/pytorch-2.0/), which includes the
  option to compile the PyTorch module for better runtime performance. This
  skorch release allows you to pass `compile=True` when initializing the net to
  enable compilation.
- Support for training on multiple GPUs with the help of the
  [`accelerate`](https://huggingface.co/docs/accelerate/index) package has been
  improved by fixing some bugs and providing a dedicated [history
  class](https://skorch.readthedocs.io/en/latest/user/history.html#distributed-history).
  Our documentation contains more information on [what to consider when training
  on multiple
  GPUs](https://skorch.readthedocs.io/en/latest/user/huggingface.html#caution-when-using-a-multi-gpu-setup).
- If you have ever been frustrated with your neural net not training properly,
  you know how hard it can be to discover the underlying issue. Using the new
  [`SkorchDoctor`](https://skorch.readthedocs.io/en/latest/helper.html#skorch.helper.SkorchDoctor)
  class will simplify the diagnosis of underlying issues. Take a look at the
  accompanying
  [notebook](https://nbviewer.org/github/skorch-dev/skorch/blob/master/notebooks/Skorch_Doctor.ipynb)

Apart from that, a few bugs have been fixed and the included notebooks have been
updated to properly install requirements on Google Colab.

We are grateful for external contributors, many thanks to:

- Kshiteej K (kshitij12345)
- Muhammad Abdullah (abdulasiraj)
- Royi (RoyiAvital)
- Sawradip Saha (sawradip)
- y10ab1 (y10ab1)

Find below the list of all changes since v0.12.1 below:

### Added
- Add support for compiled PyTorch modules using the `torch.compile` function,
  introduced in [PyTorch 2.0
  release](https://pytorch.org/get-started/pytorch-2.0/), which can greatly
  improve performance on new GPU architectures; to use it, initialize your net
  with the `compile=True` argument, further compilation arguments can be
  specified using the dunder notation, e.g. `compile__dynamic=True`
- Add a class
  [`DistributedHistory`](https://skorch.readthedocs.io/en/latest/history.html#skorch.history.DistributedHistory)
  which should be used when training in a multi GPU setting (#955)
- `SkorchDoctor`: A helper class that assists in understanding and debugging the
  neural net training, see [this
  notebook](https://nbviewer.org/github/skorch-dev/skorch/blob/master/notebooks/Skorch_Doctor.ipynb)
  (#912)
- When using `AccelerateMixin`, it is now possible to prevent unwrapping of the
  modules by setting `unwrap_after_train=True` (#963)

### Fixed
- Fixed install command to work with recent changes in Google Colab (#928)
- Fixed a couple of bugs related to using non-default modules and criteria
  (#927)
- Fixed a bug when using `AccelerateMixin` in a multi-GPU setup (#947)
- `_get_param_names` returns a list instead of a generator so that subsequent
  error messages return useful information instead of a generator `repr` string
  (#925)
- Fixed a bug that caused modules to not be sufficiently unwrapped at the end of
  training when using `AccelerateMixin`, which could prevent them from being
  pickleable (#963)

v0.12.1

Toggle v0.12.1's commit message
Preparation for release of skorch v0.12.1

Not much changed, so I don't think we need a nice release message here.