← Back to Leaderboard
Sskorch-dev

skorch-dev/skorch

A PyTorch estimator adapter for scikit-learn pipelines and model selection

View on GitHub ↗
AI Framework
Engineering Health (Methodology)
A · 82/100
Maintenance Activity
● Updated 24d ago
Latest Release
v1.4.0
Commercial License Check
BSD-3-Clause · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance31/35
Fork Adoption17/25
Release Cadence14/20
License Clarity20/20
Docker
Total Stars
★ 6,186
24h Growth
+0
7d Growth
+2
Forks
426

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

skorch-dev/skorch Star History (2020-01-12 - 2026-12-03) ALL-TIME STAR HISTORY (2020-01 – 2026-12) +3.6k in 2517d · avg +1/day 6.4k 4.2k 2.1k 2020-01-12: ★ 2,5822020-06-13: ★ 3,0502020-11-14: ★ 3,4052021-04-17: ★ 3,7192021-09-18: ★ 3,9382022-02-19: ★ 4,1962022-07-23: ★ 4,4182022-12-24: ★ 4,7492023-05-27: ★ 5,0152023-10-28: ★ 5,2482024-03-30: ★ 5,4982024-08-31: ★ 5,6662025-02-01: ★ 5,8802025-07-05: ★ 6,0122025-12-06: ★ 6,0962026-05-09: ★ 6,1392026-12-03: ★ 6,186 ★ 6.2k 2020-01 2023-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

skorch is an in-process estimator adapter, not a model server. The caller supplies a PyTorch nn.Module; NeuralNetClassifier wraps its training and prediction lifecycle behind scikit-learn methods such as fit and predict_proba. A Pipeline can fit a StandardScaler before the network, and GridSearchCV can vary both estimator settings and module constructor arguments through names such as module__num_units.

The setuptools configuration packages skorch* and excludes notebooks and assets from package discovery. The declared runtime dependencies are NumPy, scikit-learn, SciPy, tabulate, and tqdm. PyTorch is installed separately for the target platform. The extension points shown are the user’s module, nested training settings such as iterator_train__shuffle, and training callbacks; there is no separate service to connect to.

Key Capabilities & Differentiators

The concrete classifier workflow accepts NumPy input, trains a user-defined network, and returns class probabilities. The same estimator can sit behind preprocessing or be tuned with cross-validation. Training features include learning-rate scheduling, scikit-learn and custom scoring, early stopping, checkpointing, parameter freezing and unfreezing, and progress reporting in terminals or notebooks.

Hugging Face and GPyTorch integrations extend interoperability, with GPyTorch covering Gaussian-process workflows. They do not establish support for any particular LLM family, serving protocol, or inference throughput. v1.4.0 adds scikit-learn metadata routing so supported workflows can pass information such as groups through Pipeline and GridSearchCV. It also extends tensor-to-NumPy conversion to more device types without specifying an exhaustive device matrix.

Trade-offs & Limitations

Choose skorch over a handwritten PyTorch loop when estimator compatibility is the main requirement: preprocessing, scoring, and parameter search can stay in scikit-learn. A direct loop is preferable when the training procedure must be controlled explicitly and the estimator interface adds little. If a native scikit-learn estimator already meets the modeling goal, it avoids the extra PyTorch runtime and model code.

Grid search still repeats training across candidates and folds. With an internal validation split enabled, each outer fit trains on less of its fold; disabling it, as the example does, means revisiting callbacks that need internal validation scores. Size the runtime around the network, batch size, optimizer state, and concurrent fits rather than the adapter itself. The project is in low-development mode: maintenance continues, but adoption should not depend on a steady stream of new features.

Hardware & Deployment Guide

For this checkout, use Python 3.11 or newer: pyproject.toml sets that floor even though the installation prose still mentions Python 3.9. Install the CPU or accelerator build of PyTorch appropriate for the host, then install skorch with pip or from the checkout. Training and prediction run in the application process without a hosted API. For reproducibility, pin and test the Python, PyTorch, and scikit-learn combination you deploy.

Treat the root Dockerfile as legacy rather than as a current deployment recipe. It starts from nvidia/cuda:9.0-cudnn7-runtime, installs Python 3.5 tooling, and copies a requirements.txt not listed in the supplied root tree. Build a fresh image if containerization is required. Recent releases address compatibility: v1.3.0 added the fitted-state protocol, v1.3.1 fixed the boolean result of __sklearn_is_fitted__ for scikit-learn 1.8 compatibility, and v1.4.0 added metadata routing and broader device conversion.

Estimator interface: NeuralNetClassifier exposes fit and predict_proba for a PyTorch nn.Module.
Pipeline tuning: Search module__num_units alongside learning rate and epoch count, with the pipeline step prefix when applicable.
Training controls: Configurable loader shuffling, learning-rate schedules, early stopping, checkpointing, and parameter freezing.
Metadata routing: v1.4.0 makes NeuralNet a scikit-learn metadata router and consumer.
Runtime packaging: The current pyproject.toml requires Python 3.11+ and leaves PyTorch installation separate.
Container caveat: The Dockerfile uses CUDA 9.0/cuDNN 7 and Python 3.5-era tooling; its requirements.txt input is absent from the supplied root tree.
Best For

Teams with an existing scikit-learn preprocessing and evaluation workflow that need to train and tune a custom PyTorch model within it.

Skip If

You primarily need an LLM serving engine, require direct control over the training loop, or can meet the modeling goal with a native scikit-learn estimator.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
skorch ★6.2k+2Jupyter NotebookBSD-3-ClauseA PyTorch estimator adapter for scikit-learn pipelines and model selection
fastai28.3k+9Jupyter NotebookApache-2.0Layered PyTorch library for shorter training pipelines and custom training loops
llama-cookbook18.6k+6Jupyter NotebookMITNotebook-first SDK for Llama inference, fine-tuning, RAG, and API integration
annotated_deep_learning_paper_implementations67.8k+43PythonMITAnnotated PyTorch references for understanding and adapting deep learning algori

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/skorch-dev/skorch.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

skorch-dev/skorch Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about skorch

How do I tune a PyTorch model and its preprocessing together?

Wrap an nn.Module with NeuralNetClassifier and use it as the final step in a scikit-learn Pipeline. If that step is named net, a module parameter such as num_units can be tuned from GridSearchCV as net__module__num_units. Configure the outer CV splitter and skorch’s internal validation separately, especially if a callback needs validation metrics.

Do I need a GPU, and how should I size memory for a search?

No GPU is required for CPU execution. Size training memory for model parameters, gradients, optimizer state, and batch activations. If CV fits run concurrently on one GPU, each fit can add its own training footprint. Measure one representative fit before increasing batch size or search parallelism; prediction has a different memory profile.

Can we use skorch commercially and run it on our own infrastructure?

Yes. BSD-3-Clause permits commercial use and redistribution, subject to its notice, disclaimer, and non-endorsement conditions. skorch can run in your own Python environment without a hosted endpoint. Check the licenses of dependencies, model weights, and datasets separately when distributing or deploying the full application.

When is direct PyTorch or a native scikit-learn estimator a better choice?

Use a direct PyTorch loop when control over the training procedure is more important than estimator compatibility. Use skorch when you need a custom PyTorch model to participate in shared scikit-learn preprocessing and model selection. If an existing scikit-learn estimator meets the task requirements, it avoids adding PyTorch and another training layer.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining skorch-dev/skorch? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature skorch-dev/skorch on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare