v0.5.0rc1
Pre-release
Pre-release
First release candidate for version 0.5.0
Summary
This is a major release with several breaking changes and deprecations. In this
release we started implementing two major enhancement proposals and renamed the package
from estimagic to optimagic (while keeping the estimagic namespace for the estimation
capabilities).
The implementation of the two enhancement proposals is not complete and will likely
take until version 0.6.0. However, all breaking changes and deprecations (with the
exception of a minor change in benchmarking) are already implemented such that updating
to version 0.5.0 is future proof.
Pull Requests
- #500 removes the dashboard, the support for simopt optimizers and the
derivative_plot(@janosg) - #502 renames estimagic to optimagic (@janosg)
- #504 aligns
maximizeandminimizemore closely with scipy. All related
deprecations and breaking changes are listed below. As a result, scipy code that uses
minimize with the argumentsx0,fun,jacandmethodwill run without changes
in optimagic. Similarly, toOptimizeResultgets some aliases so it behaves more
like SciPy's. - #506 introduces the new
Boundsobject and deprecateslower_bounds,
upper_bounds,soft_lower_boundsandsoft_upper_bounds(@janosg) - #507 updates the infrastructure so we can make parallel releases under the names
optimagicandestimagic(@timmens) - #508 introduces the new
ScalingOptionsobject and deprecates the
scaling_optionsargument ofmaximizeandminimize(@timmens) - #512 implements the new interface for objective functions and derivatives
(@janosg) - #513 implements the new
optimagic.MultistartOptionsobject and deprecates the
multistart_optionsargument ofmaximizeandminimize(@timmens) - #514 and #516 introduce the
NumdiffResultobject that is returned from
first_derivativeandsecond_derivative. It also fixes several bugs in the
pytree handling infirst_derivativeandsecond_derivativeand deprecates
Richardson Extrapolation and thekey(@timmens) - #517 introduces the new
NumdiffOptionsobject for configuring numerical
differentiation during optimization or estimation (@timmens) - #519 rewrites the logging code and introduces new
LogOptionsobjects
({ghuser}schroedk) - #521 introduces the new internal algorithm interface.
(@janosg and @mpetrosian) - #522 introduces the new
Constraintobjects and deprecates passing
dictionaries or lists of dictionaries as constraints (@timmens)
Breaking changes
- When providing a path for the argument
loggingof the functions
maximizeandminimizeand the file already exists, the default
behavior is to raise an error now. Replacement or extension
of an existing file must be explicitly configured. - The argument
if_table_existsinlog_optionshas no effect anymore and a
corresponding warning is raised. OptimizeResult.historyis now aoptimagic.Historyobject instead of a
dictionary. Dictionary style access is implemented but deprecated. Other dictionary
methods might not work.- The result of
first_derivativeandsecond_derivativeis now a
optimagic.NumdiffResultobject instead of a dictionary. Dictionary style access is
implemented but other dictionary methods might not work. - The dashboard is removed
- The
derivative_plotis removed. - Optimizers from Simopt are removed.
- Passing callables with the old internal algorithm interface as
algorithmto
minimizeandmaximizeis not supported anymore. Use the new
Algorithmobjects instead. For examples see: https://tinyurl.com/24a5cner
Deprecations
- The
criterionargument ofmaximizeandminimizeis renamed tofun(as in
SciPy). - The
derivativeargument ofmaximizeandminimizeis renamed tojac(as
in SciPy) - The
criterion_and_derivativeargument ofmaximizeandminimizeis renamed
tofun_and_jacto align it with the other names. - The
criterion_kwargsargument ofmaximizeandminimizeis renamed to
fun_kwargsto align it with the other names. - The
derivative_kwargsargument ofmaximizeandminimizeis renamed to
jac_kwargsto align it with the other names. - The
criterion_and_derivative_kwargsargument ofmaximizeandminimizeis
renamed tofun_and_jac_kwargsto align it with the other names. - Algorithm specific convergence and stopping criteria are renamed to align them more
with NlOpt and SciPy names.convergence_relative_criterion_tolerance->convergence_ftol_relconvergence_absolute_criterion_tolerance->convergence_ftol_absconvergence_relative_params_tolerance->convergence_xtol_relconvergence_absolute_params_tolerance->convergence_xtol_absconvergence_relative_gradient_tolerance->convergence_gtol_relconvergence_absolute_gradient_tolerance->convergence_gtol_absconvergence_scaled_gradient_tolerance->convergence_gtol_scaledstopping_max_criterion_evaluations->stopping_maxfunstopping_max_iterations->stopping_maxiter
- The arguments
lower_bounds,upper_bounds,soft_lower_boundsand
soft_upper_boundsare deprecated and replaced byoptimagic.Bounds. This affects
maximize,minimize,estimate_ml,estimate_msm,slice_plotand several
other functions. - The
log_optionsargument ofminimizeandmaximizeis deprecated. Instead,
LogOptionsobjects can be passed under theloggingargument. - The class
OptimizeLogReaderis deprecated and redirects to
SQLiteLogReader. - The
scaling_optionsargument ofmaximizeandminimizeis deprecated. Instead a
ScalingOptionsobject can be passed under thescalingargument that was previously
just a bool. - Objective functions that return a dictionary with the special keys "value",
"contributions" and "root_contributions" are deprecated. Instead, likelihood and
least-squares functions are marked with amark.likelihoodormark.least_squares
decorator. There is a detailed how-to guide that shows the new behavior. This affects
maximize,minimize,slice_plotand other functions that work with objective
functions. - The
multistart_optionsargument ofminimizeandmaximizeis deprecated. Instead,
aMultistartOptionsobject can be passed under themultistartargument. - Richardson Extrapolation is deprecated in
first_derivativeandsecond_derivative - The
keyargument is deprecated infirst_derivativeandsecond_derivative - Passing dictionaries or lists of dictionaries as
constraintstomaximizeor
minimizeis deprecated. Use the newConstraintobjects instead.