Changelog¶
[Unreleased]¶
Fixed¶
- Divergence guard: normal late-training jitter (e.g. 0.02 → 0.08) no longer counts as a spike, and cuts stop at the bottom of the learning rate's range. The first rule cut the learning rate to near zero on MNIST in the ablation.
Changed¶
- Defaults now match the published benchmark:
warmup_epochs=2,max_delta=0.5,n_startup_trials=3, in the adapter,BayesianOptimizer, configs anddefaults.yaml. Code that relied on the old defaults (no warmup, unclipped steps, 10 random trials) should passwarmup_epochs=0, max_delta=Noneandn_startup_trials=10.
Added¶
PyTorchHyperParameterAdapter(optimizer): the search space is optional. Without one, the learning rate is tuned within[lr / 100, lr * 10](log scale);tune=["lr", "weight_decay"]adds weight decay.infer_space()exposes the rule.from autotunenet import PyTorchHyperParameterAdapter(andBayesianOptimizer,ParameterSpace,infer_space,build_pytorch_autotunenet).tuner.history, a decision log (one entry per call: what ran, its score, the action and why), andhistory_to_csv().state_dict()/load_state_dict()on the adapter andBayesianOptimizer: a resumed run makes the same decisions as an uninterrupted one. Plain values only, sotorch.load(weights_only=True)works.- Options, off by default (the ablation and recovery runs showed no accuracy gain from any of them):
score="progress"(TPE learns from the improvement during each interval),history_window(TPE forgets old trials),spike_factorwithon_batch_end(loss)(cuts the learning rate within an epoch on a loss spike or NaN),model=..., keep_best=Truewithrestore_best()(keeps the best weights; restored automatically on divergence). The config acceptstuning.score,tuning.spike_factorandsearch.history_window. - Benchmark: the
ablationexperiment (each option on its own, 144 runs), method variants in experiment files (uses: <method>), controller hookson_train_start,on_batch_endandon_train_end, and the decision log stored with each AutoTuneNet result. - Benchmark: the
recoveryexperiment (starts 3× and 10× above each task's learning rate),bad_initial_lrtakeslr_factor(a multiple of the task's learning rate), and scenario variants (uses: <scenario>). - Ablation and recovery results on the Results page, and a plain statement in the README of what they show: AutoTuneNet does not beat simple schedules on accuracy.
autotunenet run --fresh, and thepilotexperiment as a scratch space for test runs (its results are not tracked).
[1.1.0] - 2026-12-02¶
Added¶
autotunenetcommand, installed with the package:list,setup,data,prepare,start,status,pull,report,run.autotunenet --helplists them;autotunenet <command> --helpgives details and examples. Every stage resumes where it stopped.- Runtimes: this machine (default) and Kaggle (
--runtime kaggle). The Kaggle runtime uploads data as private datasets, writes readable notebooks, uses two GPUs per notebook and downloads results as notebooks finish. --pluginsfor your own tasks (any dataset and model), scenarios and methods; tasks can declaredata_pathsandprepare_datafor hosted runtimes.- Benchmark harness (
autotunenet.bench) with Fixed LR, cosine, ReduceLROnPlateau, AutoTuneNet, Optuna TPE, ASHA, Hyperband and PBT (Ray Tune), a compute ledger per run, and a support matrix (SVG, Markdown, HTML) that tracks progress. pip install "autotunenet[bench]"extra for PBT, Kaggle and figures.- Documentation site (MkDocs Material) with an API reference generated from docstrings, published to GitHub Pages; runnable examples in
examples/. CONTRIBUTING.md.--run-timeout MINUTES: a run that exceeds it fails and the next one starts (60 minutes by default on Kaggle). PBT uses Ray's own time budget inside it, so Ray stops cleanly.- Live progress for Kaggle runs: which run each GPU is on, finished and failed runs with accuracy and time, and a local
live.logper notebook. Local runs print one readable line per run (▶ started, ✓ finished, ✗ failed). CITATION.cfffor GitHub's "Cite this repository".MNISTCNNmodel and thebenchmarks/common/tasks.pytask registry.- Regression tests for config parsing, factory stability settings and
from_config. - Log-scale search ranges:
{low, high, log: true}in configs, and{"low", "high", "log": True}in Python. A warning is shown for wide linear ranges. n_startup_trials(config sectionsearch) controls how many random trials TPE runs before using its model.- Benchmark runners take
--task,--device(including Apple MPS) and--seed. Addsautotunenet_bench/aggregate.pyfor multi-seed summaries andplot_results.py, which also redraws the paper's figures. - Python 3.12 and 3.13 support (tested in CI on 3.10 to 3.13), and
ruff checkin CI. - Tests that run the Kaggle runtime end to end against a fake
kaggleCLI. - Release workflow: a
vX.Y.Ztag publishes to PyPI with trusted publishing and creates the GitHub release. - Community files: code of conduct, security policy, accessibility statement, issue and pull request templates.
Fixed¶
-
PBT fetches the task's data before starting its Ray members; they used to download it at the same time, which could hang a run for hours on Kaggle.
-
Config parameter spaces:
[low, high]in YAML/dict configs is now a continuous range. It used to be silently treated as two categorical values. Scientific notation such as1e-4, which PyYAML reads as a string, is coerced to float. PyTorchHyperParameterAdapter.from_configno longer crashes. It had a misspelledsmoothing_windowargument and read a non-existentconfig.adaptersection. It now delegates tobuild_pytorch_autotunenet.build_pytorch_autotunenetnow applies thestabilitysection (max_regression,patience,cooldown) and accepts aseed.autotunenet_bench/run_benchmarks.pychooses the dataset and model from the config'staskfield (mnist|cifar10). It previously always used CIFAR-10. The runner also applies the config's stability settings.defaults.yamlis now included in the built wheel.- TPE is told the hyperparameters that actually ran, after
max_deltaclipping, not the unclipped proposal. - The gradient-noise benchmark regime now adds noise on every backward pass. Before, it had no effect on training.
- A NaN/Inf score triggers an immediate rollback and never enters the history. Before, a NaN at the first tuning step disabled the stability guard.
- Rollback restores the last good configuration exactly, instead of clipping it with
max_delta. - Configurations rejected by the guard are reported to TPE with their real score, and TPE gets each configuration's own score rather than the smoothed average.
- Regressing steps, during cooldown or within the patience allowance, no longer become the rollback target.
step(),on_step_end()andon_validation_end()score the configuration that produced the metric, using the same flow ason_epoch_end(). The metric warmup gate is latched once passed.- Post-shift benchmark metrics use a pre-shift baseline that is frozen at the shift.
- The packaged
defaults.yamlno longer disables tuning, and now holds exactly the code defaults; values ≤ 0 forwarmup_metric_thresholdare rejected. - Kaggle: the MNIST dataset upload is processed (it held both
.gzfiles and their contents, which Kaggle rejected), so notebooks attach it instead of downloading MNIST. - Kaggle:
autotunenet runstarts a new round when the previous round's notebooks were deleted, instead of ending without running anything. - Kaggle: the final summary includes the last notebook to finish.
- PBT loads checkpoints on the CPU; every member used to crash after its first exploit on a GPU. A run fails if any member fails.
- Ctrl-C stops a PBT run (Ray no longer catches it).
Changed¶
autotunenet runsaves the report without printing the support matrix;autotunenet reportprints it.- The benchmark scripts in
benchmarks/andautotunenet_bench/were replaced byautotunenet.benchand theautotunenetcommand. Their results are kept inbenchmarks/results/legacy/and converted to the new format inbenchmarks/results/previous/. - Categorical values in configs must be written as
{choices: [...]}. A continuous range can also be written as{low: a, high: b}. Lists that don't have exactly two elements are rejected. - Config validation now covers
smoothing_window,max_regression,patienceandcooldown. - Benchmarks are reported as mean ± std over 3 seeds, with test accuracy on the held-out test split, on MNIST and CIFAR-10.
- Development tooling moved to uv: a
devdependency group, auv.locklockfile, and.python-version. CI usesuv sync --locked.requirements.txtwas removed.
[v1.0.1] - 2025-12-28¶
Added¶
- Bayesian hyperparameter optimization using Optuna (ask-tell interface)
- Training-time hyperparameter tuning (no separate trials)
- Stability monitoring with:
- regression detection
- consecutive failure thresholds (patience)
- cooldown periods
- Safe rollback to last known good hyperparameters
- Metric smoothing for noisy training signals
- PyTorch adapter for seamless integration with training loops
- Adapter hooks:
on_step_end,on_epoch_end,on_validation_end - Multi-parameter tuning support (eg. lr, momentum, weight_decay)
- Config-driven tunning with file + console output
- Full unit test coverage for:
- core optimizer
- stability safeguards
- PyTorch adapter
- config loader
Changed¶
- Optimizer lifecycle stabilized to prevent double-tell and state corruption
- Logging improved to reduce noise and highlight state transitions
Fixed¶
- Optuna trial lifecycle errors
- Repeated rollback log spam
- Unsafe Optimizer state mutation during tuning
Notes¶
- This is the first public release of AutoTuneNet
- API is stable for core usage, but subject to refinement based on community feedback.
[v1.0.2] - 2026-01-03¶
Added¶
- Safe warmup phase for training-time hyperparameter tuning(supports epoch-based & metric-based warmup)
- Bounded update constraint (
max_delta) to prevent aggresive hyperparameter jumps - Config-driven exposure of tuning safety parameters
- Factory based adapter construction for PyTorch
- Comprehensive benchmark suite with reproducible scripts
Improved¶
- Training stability under non-stationary objectives
- Benchmark reliability and reproducibility
- Default out-of-the-box behaviour
- Documentation clarity around assumptions and limitations
Benchmarks¶
- Added comparison against:
- Fixed Learning rate
- CosineAnnealing LR
- Offline Optuna-based HPO
- Added stress tests with intentionally unsafe initial configurations
- Included plots for loss, accuracy, learning rate evolution
Notes¶
AutoTuneNet v1.0.2 prioritizes safe and predictable adaptation over aggresive optimization, making it suitable for long-running and sensitive training workflows.