v0.5.0
One change: the plain-string options now warn. Nothing else moves, and no result changes.
This is the release 1.0.0 was waiting on. The policy is that anything removed in a major release
warns for at least one minor release first, so strings could not be removed until this shipped.
Changed
-
Plain strings now emit
DeprecationWarning. 0.4.0 deprecated them in writing only, because
mode="batch"was what the documentation showed at the time. This is the warning that follows the
written notice, and it is the last step before 1.0.0 removes strings entirely.The message names the exact replacement, so migrating is a substitution you read off it:
Passing mode='batch' as a plain string is deprecated and will stop working in 1.0.0. Use TrainingMode.BATCH instead.Two things it deliberately does not do. It does not fire for a spelling that was never valid, so
mode="stochastic"still raises itsValueErrorinstead of burying the real mistake under a
deprecation notice. And it does not fire when a map is loaded from a.npz: the name in an
artifact is a serialisation detail, since JSON has no enums, so the loader converts it rather than
warning about a string the caller never wrote.To silence it while migrating, filter
DeprecationWarningfor thepython_sommodule.
Fixed
- Error messages showed an enum's repr when one was passed.
weight_initialization(mode=WeightInit .LINEAR)reported<WeightInit.LINEAR: 'linear'> initialization requires .... Both spellings now
produce identical text.