Skip to content

Releases: Axect/pytorch-scheduler

v0.2.1 — Pyright type fixes

14 Mar 13:14

Choose a tag to compare

Fixed

  • Resolve all pyright type errors: cast base_lrs to list[float], use isinstance for _lr_at delegation, fix return types in presets and visualization modules

Full Changelog: v0.2.0...v0.2.1

v0.2.0 — Pure Functional Core, New Schedulers & Presets

14 Mar 11:14

Choose a tag to compare

What's New

Architecture

  • Pure functional _lr_at() core for all 17 schedulers — enables safe composition without state mutation
  • WarmupScheduler and SequentialComposer now use delegation instead of mutating child state

New Schedulers

  • CosineWithWarmupScheduler — the modern default for LLM/ViT training (linear warmup + cosine decay)
  • WarmupHoldCosineScheduler — three-phase schedule (warmup → hold → cosine decay)

Adoption & UX

  • Opinionated presets: llm_pretrain, llm_finetune, vision_finetune, vision_pretrain, transfer_small_data, budgeted_training
  • create_from_preset() for one-line scheduler creation
  • create_scheduler_from_plan() with automatic total_steps calculation
  • Step-semantics metadata (step_unit, needs_total_steps) on all schedulers
  • README restructured as a task-oriented decision guide with Scheduler Cards

Testing

  • Formula-based golden tests for all paper-referenced schedulers
  • Contract test suite: 7 universal invariants × 17 schedulers
  • Property-based boundary fuzzing with Hypothesis
  • 544 tests, 93% coverage

Fixes

  • README citation errors corrected: KDecay (2004.05909), Rex (2107.04197), LinearDecay (2405.18392)

Infra

  • GitHub Actions CI with Python 3.10–3.13 matrix
  • CHANGELOG following Keep a Changelog format

Install

pip install pytorch-scheduler==0.2.0

Full Changelog: https://github.com/Axect/pytorch-scheduler/blob/main/CHANGELOG.md