Repository navigation
autotrainer 0.17.0
·
6 commits
to 24833c47da32096cc4d0675de05b16e3f95967f2
since this release
[0.17.0] - 2026-10-07
Added
- Test suite expansion & quality gates: Overall test coverage expanded to 86.5%
(coverage floor raised to 80% inpyproject.toml), adding exhaustive unit coverage
acrosscli,__init__,detect,auto_optim,tf_backend, anduiendpoints.
Fixed
- A
.jsonsave_pathon an sklearn-API booster wrote a pickle. The
estimator branch oftrain()always calledjoblib.dump, so
train(XGBClassifier(...), X, y, save_path="model.json")- what
examples/xgboost_example.pydoes, and what the example docstrings
advertise - produced a joblib pickle named.jsonthatxgboostcould not
load back. A.json/.ubjpath on an estimator with its ownsave_model
now uses that native writer; everything else (LightGBM's wrapper included,
which has nosave_model) still pickles as before. train(optimizer=...)andauto(optimizer=...)discarded a passed
optimizer. Only a name ("adamw"/"sgd") was ever honored: an
optimizer instance went to_choose_optimizeras if it were a name, came
back verbatim, and_build_optimizerthen compared it to"sgd"and
constructed a fresh AdamW - so a passedAdam(lr=7e-3)silently trained as
AdamW at whatever the LR range test returned. Instances are now used as-is,
the same passthrough_make_lossalready did for a loss instance, and the
lr on the passed optimizer is respected unlesslr=is also given (in which
case it is applied to that optimizer rather than one of the two being
dropped).examples/pytorch_ddp.pyadvertised this and never got it.- DataLoader workers ignored the SLURM allocation. The worker count was
sized from the node's physical core count (psutil.cpu_count), which does
not respect cgroups or cpusets. A job granted 2 CPUs on a 128-core node got
the cap of 8 workers per rank - four times its whole allocation - and they
thrashed against the cgroup. Worker sizing now usesSLURM_CPUS_PER_TASK
and falls back toos.sched_getaffinity, matching what the sklearn and
boosting backends already did forn_jobs. All three now share
utils.available_cpus(), so they can no longer disagree about the
allocation.
Added
channels_lastfor conv nets underprepare(optimize=True), gated on
AMP: measured +28% per step on a small conv net (RTX 5070), rising to +34%
whentrain_step()also converts the input. Gated deliberately - the same
conversion measured 3x slower in fp32/TF32, where cuDNN's fast paths are
NCHW. Applied only when every convolution is aConv2d, since the layout is
4D. Reported in theoptimize:line like every other change.- Fused optimizers in
auto()on CUDA: +11-12% per step on ordinary nets,
and over 2x when the optimizer step dominates. Only for the optimizer
auto()builds; one you pass in is never modified. autotrainer doctornow checks the two things that silently halve
throughput on a cluster: the per-rank CPU budget (with thenum_workersit
implies, and a warning when one CPU has to feed a GPU) and whether scratch
looks networked. It also warns whenSLURM_CPUS_PER_TASKis unset inside a
job.
Changed
- The Web UI's markup moved out of
ui.pyinto
src/autotrainer/templates/.ui.pywas 4,629 lines, of which 3,707 were
two HTML documents held as string literals - the export report as an
f-string, so every one of its 122 CSS brace pairs was doubled and none of it
could be linted or highlighted as HTML. The templates are now.htmlfiles
filled by_render()at request time, andui.pyis 954 lines of server
code. Rendered output is byte-identical; both files ship in the wheel and
the sdist. auto()builds the optimizer afterprepare()has placed the model, so the
params are on the GPU in time for the fused kernels._make_optimizersplit
into_choose_optimizer(the decision, on the raw model) and
_build_optimizer(the construction, after placement). Both are internal;
the inferred recipe is unchanged.
Removed
- Hyperparameter search (
fit(),tune()) is gone. Autotrainer is the
execution layer: it makes your recipe run correctly and fast on the
hardware you have. Searching for a better recipe is a different job, and
Optuna and Ray Tune already do it well - use either one and call
prepare()inside the objective. What this removes:autotrainer.fit()andautotrainer.tune(), and theautotrainer.tuning,
autotrainer.tuning_estimator,autotrainer.metrics,autotrainer.fitting
andautotrainer._fit_searchmodules.- The
metric=selection knob (accuracy/f1/auc/r2), the Optuna
journal-file parallel search, and the phase-1/phase-2 checkpoint format. autotrainer.augment_batch()and theautotrainer.augmentmodule; it
existed to give the search a scalar regularizer to tune.sanity.overlap()- the train/val leak check. Nothing takes both a train
and a validation loader any more, so it was unreachable.- The
tuneextra (pip install "autotrainer[tune]"). Optuna is no longer
a dependency of any extra, includingall.
docs/guide/fit.md,examples/pytorch_fit.py,examples/pytorch_tune.py.
Changed
autotrainer.train()moved fromautotrainer.fittingto
autotrainer.training(both are internal modules;autotrainer.train
is unchanged).- New One-line training guide covering
train(),auto(), and the data checks, replacingdocs/guide/fit.md.
Preemption (autotrainer.preempt) now documented in the scaling guide.
Unaffected: prepare(), auto(), train(), train_step(), the launcher,
SLURM support, the monitors, the trackers, and the UI.