Repository navigation
Infinite Training 2.1.0
Backward compatible with 2.0.0: existing code keeps working and warns where an
API has been renamed.
Fixed
Target(target_value=0)is now honoured. The default was selected with
target_value or <bound>, so a falsy0/0.0was replaced by an unreachable
bound and the session could never stop on that target.last_valueno longer raisesAttributeErrorwhen read before training, or
after an interrupt during the first round. It is derived from the persisted
value history, so it also survives a restart.Target()is no longer used as a default argument value, which meant every
trainer built without an explicit target shared one mutable instance.- Calling
train()or an inference method beforecompile()now raises a clear
RuntimeErrorinstead ofAttributeError: 'InfiniteTrainer' object has no attribute 'best_model'. - A target naming a metric that is absent from the training history now raises a
RuntimeErrorlisting the available keys, instead of a bareKeyError. When
the missing key starts withval_, the message points atvalidation_data. - Checkpoint parent directories are created automatically; previously a path
such asruns/exp1/best.npyfailed unless the directory already existed. - Restored checkpoint values are converted back to Python floats and plain
weight lists rather than being left as zero-dimensional object arrays. KeyboardInterruptis logged instead of silently swallowed.requires-pythoncorrected from>=3.9to>=3.10. TensorFlow has required
3.10 or newer since 2.16, so the old floor advertised an uninstallable
combination.
Added
InfiniteTrainer, the new name forInfinityTraining.rounds_completedproperty.save()as a public method for checkpointing on demand.Target.is_improvement(),Target.is_reached()and
Target.worst_possible_value, so the comparison rules live with the target.__version__and__all__exports.- A CI workflow running lint, tests on Python 3.10-3.12, and a packaging check
on every push and pull request. Previously tests ran only when a release was
published. - The publish workflow verifies that the release tag matches the packaged
version. CONTRIBUTING.md,CHANGELOG.md, and a rewrittenREADME.mdwith an API
reference, a resume guide and a security note.- Test suite covering targets, stop conditions, persistence and resume,
error handling, and the deprecation shims (55 tests, up from 3).
Changed
- The package is split into
target.py,trainer.pyand_storage.py. Public
imports are unchanged:from infinite_training import InfiniteTrainer, Target. - Type hints use
floatrather thannp.doublefor scalar values. - Progress and stop reasons are reported through the
loggingmodule. run.pymoved toexamples/mnist.pyand no longer ships inside the wheel.- Packaging declares its packages explicitly, so
testsis no longer picked up
by auto-discovery.
Removed
- The unused
polarsruntime dependency.
Deprecated
The following still work and will be removed in 3.0.0:
| Deprecated | Replacement |
|---|---|
InfinityTraining |
InfiniteTrainer |
optimize_weight |
best_weights |
last_weight |
last_weights |
optimize_value |
best_value |
list_value |
value_history |
optimize_model |
best_model |
predict_optimize() |
predict_best() |
optimize_weight_path= |
best_weights_path= |
last_weight_path= |
last_weights_path= |
optimize_value_path= |
best_value_path= |
list_value_path= |
value_history_path= |
Full changelog: https://github.com/vyncint/infinite-training/blob/main/CHANGELOG.md
Compare: v2.0.0...v2.1.0