skorch

skorch

โ˜… 4 ๐Ÿ”– 2500 saves ๐Ÿ’ฐ Free GitHub

skorch is an open-source Python library that wraps PyTorch neural networks in a scikit-learn-compatible interface. It has earned about 6,200 stars on GitHub, is released under the BSD-3-Clause license, and is actively maintained with updates in 2026.

Overview

PyTorch gives you full control over model code, while scikit-learn gives you a beloved workflow of fit, predict, pipelines and grid search. skorch bridges the two: you write a standard PyTorch module, wrap it in skorch’s NeuralNet classes, and immediately gain scikit-learn compatibility, including cross-validation, hyperparameter search with GridSearchCV or RandomizedSearchCV, and composition in sklearn Pipelines. It handles training loops, callbacks, checkpointing and history logging, and integrates with Hugging Face transformers, making it a pragmatic middle ground between raw PyTorch and high-level frameworks.

Key Features

  • Scikit-learn compatible API for arbitrary PyTorch modules
  • Works with GridSearchCV, RandomizedSearchCV and sklearn Pipelines
  • Built-in training loop with callbacks, scoring and checkpointing
  • Full access to PyTorch: no wrapper-imposed limits on your model code
  • Hugging Face integration for transformer-based workflows
  • Training history and progress display out of the box
  • BSD-3-Clause licensed and community maintained

A rich callback system is a big part of skorch’s appeal: shipped callbacks cover early stopping, learning-rate scheduling, checkpointing, progress bars and metric logging, and you can write custom callbacks for almost any training behavior. skorch also provides ready-made NeuralNetClassifier and NeuralNetRegressor classes, helpers for loading data incrementally, and utilities to move between pure PyTorch training and the wrapper without rewriting your model, which lowers the risk of adopting it in an existing codebase.

๐Ÿ’ณ Pricing

skorch is completely free and open source under the BSD-3-Clause license. There are no paid plans or commercial editions; install it from PyPI and use it in research or production freely.

Who Is It For

skorch is for data scientists and ML engineers who love the scikit-learn workflow but need the flexibility of PyTorch models, especially for systematic hyperparameter tuning and pipeline-based experiments.

๐Ÿš€ Visit skorch Official Site

๐Ÿšฉ Report an issue