- additional benchmarks
- adding tests in the CI
- helpers for choosing algorithms for different problems
- fix the issue with the Boston dataset
- Add many quasi-opposite variants
- Improve the Dagsduhloid benchmark
- Get rid of legacy pypi solver in CircleCI
- Update Pypi in CircleCI
- Switch to Python 3.8
- Add the Dagstuhloid benchmark
- Add yet another group of metamodels
- Fix links
- Add metamodels
- Update for weighted multiobjective optimization with differential evolution
- Removed
descriptorfield of parameters which had been deprecated in previous versions. Usefunctionfield instead to specify if the function is deterministic or not #X.
TransitionChoicebehavior has been changed to use bins instead of a full float representation. This may lead to slight changes during optimizations. It can also be set as unordered for use with discrete 1+1 optimizers (experimental)- Adding NGOptRW, presumably better than NGOpt for real-world problems.
- Making some dependencies optional because running was becoming too complicated.
- Adding the NLOPT library.
- Adding smoothness operators for discrete optimization.
- Adding YAPBBOB, with a parameter regulating YABBOB-like problems so that the distribution of the optimum is less rotationally invariant.
- Adding constrained counterparts of YABBOB: yapenbbob (a few constraints), yaonepenbbob (single constraint), yamegapenbbob (many constraints).
- Improvements in the photonics benchmarks.
- Externalizing CompilerGym.
- Making some tests less flaky.
- Adding Simulated annealing and Tabu search.
- Making the code more robust to Gym environments.
copy()method of aParameterdoes not change the parameters's random state anymore (it used to reset it toNone#1048MultiobjectiveFunctiondoes not exist anymore #1034.ChoiceandTransitionChoicehave some of their API changed for uniformization. In particular,indicesis now anng.p.Array(and not annp.ndarray) which contains the selected indices (or index) of theChoice. The sampling is performed by specific "layers" that are applied toDataparameters #1065.Parameter.set_standardized_spacedoes not take adeterministicparameter anymore #1068. This is replaced by the more generalwith ng.p.helpers.determistic_sampling(parameter)context. One-shot algorithms are also updated to choose options ofChoiceparameters deterministically, since it is a simpler behavior to expect compared to sampling the standardized space than sampling the option stochastically from thereRandomSearchnow defaults to sample values using theparameter.sample()instead of a Gaussian #1068. The only difference comes with bounded variables since in this caseparameter.sample()samples uniformly (unless otherwise specified). The previous behavior can be obtained withRandomSearchMaker(sampler="gaussian").PSOAPI has been slightly changed #1073Parameterinstancesdescriptorattribute is deprecated, in favor of a combinaison of an analysis function (ng.p.helpers.analyze) returning information about the parameter (eg: whether continuous, deterministic etc...) and a newfunctionattribute which can be used to provide information about the function (eg: whether deterministic etc) #1076.- Half the budget alloted to solve cheap constrained is now used by a sub-optimizer #1047. More changes of constraint management will land in the near future.
- Experimental methods
Array.set_recombinationandArray.set_mutation(custom=.)are removed in favor of layers changingArraybehaviors #1086. Caution: this is still very experimental (and undocumented). - Important bug correction on the shape of bounds if specified as tuple or list instead of np.ndarray #1221.
masterbranch has been renamed tomain. See #1230 for more context.Parameterclasses are undergoing heavy changes, please open an issue if you encounter any problem. The midterm aim is to allow for simpler constraint management.Parameterhave been updated have undergone heavy changes to ease the handling of their tree structure ( #1029 #1036 #1038 #1043 #1044 )Parameterclasses have now a layer structure #1045 which simplifies changing their behavior. In future PRs this system will take charge of bounds, other constraints, sampling etc.- The layer structures allows disentangling bounds and log-distribution. This goal has been reached with
#1053 but may create some instabilities. In particular,
the representation (
__repr__) ofArrayhas changed, and theirboundsattribute is no longer reliable for now. This change will eventually lead to a new syntax for settings bounds and distribution, but it's not ready yet. DEinitial sampling as been updated to take bounds into accounts #1058Arraycan now takelowerandupperbounds as initialization arguments. The array is initialized at its average if notinitis provided and both bounds are provided. In this case, sampling will be uniformm between these bounds.- Bayesian optimizers are now properly using the bounds for bounded problem, which may improve performance #1222.
- the new
nevergrad.errorsmodule gathers errors and warnings used throughout the package (WIP) #1031. EvolutionStrategynow defaults to NSGA2 selection in the multiobjective case- A new experimental callback adds an early stopping mechanism #1054.
Choice-like parameters now accept integers are inputs instead of a list, as a shortcut forrange(num)#1106.- An interface with Pymoo optimizers has been added #1197.
- An interface with BayesOptim optimizers has been added #1179.
- Fix for abnormally slow iterations for large budgets using CMA in a portfolio #1350.
- A new
enable_picklingoption was added to optimizers. This is only necessary for some of them (among whichscipy-based optimizer), and comes at the cost of additional memory usage #1356 #1358.
tellmethod can now receive a list/array of losses for multi-objective optimization #775. For now it is neither robust, nor scalable, nor stable, nor optimal so be careful when using it. More information in the documentation.- The old way to perform multiobjective optimization, through the use of :code:
MultiobjectiveFunction, is now deprecated and will be removed after version 0.4.3 #1017. - By default, the optimizer now returns the best set of parameter as recommendation #951, considering that the function is deterministic. The previous behavior would use an estimation of noise to provide the pessimistic best point, leading to unexpected behaviors #947. You can can back to this behavior by specifying: :code:
parametrization.descriptors.deterministic_function = False
DEand its variants have been updated to make full use of the multi-objective losses #789. Other optimizers convert multiobjective problems to a volume minimization, which is not always as efficient.- as an experimental feature we have added some preliminary support for constraint management through penalties. From then on the prefered option for penalty is to register a function returning a positive float when the constraint is satisfied. While we will wait fore more testing before documenting it, this may already cause instabilities and errors when adding cheap constraints. Please open an issue if you encounter a problem.
tellargumentvalueis renamed tolossfor clarification #774. This can be breaking when using named arguments!ExperimentFunctionnow automatically records arguments used for their instantiation so that they can both be used to create a new copy, and as descriptors if there are of type int/bool/float/str [#914](#914 #914).- from now on, code formatting needs to be
blackcompliant. This is simply performed by runningblack nevergrad. A continuous integration checks that PRs are compliant, and the precommit hooks have been adapted. For PRs branching from an old master, you can runblack --line-length=110 nevergrad/<path_to_modified_file>to make your code easier to merge. - Pruning has been patched to make sure it is not activated too often upon convergence #1014. The bug used to lead to important slowdown when reaching near convergence.
recommendnow provides an evaluated candidate when possible. For non-deterministic parametrization likeChoice, this means we won't resample, and we will actually recommend the best past evaluated candidate #668. Still, some optimizers (likeTBPSA) may recommend a non-evaluated point.ChoiceandTransitionChoicecan now take arepetitionsparameters for sampling several times, it is equivalent to :code:Tuple(*[Choice(options) for _ in range(repetitions)])but can be be up to 30x faster for large numbers of repetitions #670 #696.- Defaults for bounds in
Arrayis nowbouncing, which is a variant ofclippingavoiding over-sompling on the bounds #684 and #691.
This version should be robust. Following versions may become more unstable as we will add more native multiobjective optimization as an experimental feature. We also are in the process of simplifying the naming pattern for the "NGO/Shiwa" type optimizers which may cause some changes in the future.
Archivenow stores the best corresponding candidate. This requires twice the memory compared to before the change. #594Parameternow holds aloss: Optional[float]attribute which is set and used by optimizers after thetellmethod.- Quasi-random samplers (
LHSSearch,HammersleySearch,HaltonSearchetc...) now sample in the full range of bounded variables when thefull_range_samplingisTrue#598. This required some ugly hacks, help is most welcome to find nices solutions. full_range_samplingis activated by default if both range are provided inArray.set_bounds.- Propagate parametrization system features (generation tracking, ...) to
OnePlusOnebased algorithms #599. - Moved the
Selectordataframe overlay so that basic requirements do not includepandas(only necessary for benchmarks) #609 - Changed the version name pattern (removed the
v) to unify withpypiversions. Expect more frequent intermediary versions to be pushed (deployment has now been made pseudo-automatic). - Started implementing more ML-oriented testbeds #642
- Removed all deprecated code #499. That includes:
instrumentationas init parameter of anOptimizer(replaced byparametrization)instrumentationas attribute of anOptimizer(replaced byparametrization)candidate_maker(not needed anymore)optimizemethods ofOptimizer(renamed tominimize)- all the
instrumentationsubpackage (replaced byparametrization) and its legacy methods (set_cheap_constraint_checkeretc)
- Removed
ParametrizedOptimizerandOptimizerFamilyin favor ofConfiguredOptimizerwith simpler usage #518 #521. - Some variants of algorithms have been removed from the
ng.optimizersnamespace to simplify it. All such variants can be easily created using the correspondingConfiguredOptimizer. Also, addingimport nevergrad.optimization.experimentalvariantswill populateng.optimizers.registrywith all variants, and they are all available for benchmarks #528. - Renamed
a_minanda_maxinArray,ScalarandLogparameters for clarity. Using old names will raise a deprecation warning for the time being. archiveis pruned much more often (eg.: fornum_workers=1, usually pruned to 100 elements when reaching 1000), so you should not rely on it for storing all results, use a callback instead #571. If this is a problem for you, let us know why and we'll find a solution!
- Propagate parametrization system features (generation tracking, ...) to
TBPSA,PSOandEDAbased algorithms. - Rewrote multiobjective core system #484.
- Activated Windows CI (still a bit flaky, with a few deactivated tests).
- Better callbacks in
np.callbacks, including exporting tohiplot. - Activated documentation on github pages.
- Scalar now takes optional
lowerandupperbounds at initialization, andsigma(and optionnallyinit) if is automatically set to a sensible default #536.
- Fist argument of optimizers is renamed to
parametrizationinstead ofinstrumentationfor consistency #497. There is currently a deprecation warning, but this will be breaking in v0.4.0. - Old
instrumentationclasses now raise deprecation warnings, and will disappear in versions >0.3.2. Hence, prefere using parameters fromng.pthanng.var, and avoid usingng.Instrumentationaltogether if you don't need it anymore (or import it throughng.p.Instrumentation). CandidateMaker(optimizer.create_candidate) raisesDeprecationWarnings since it new candidates/parameters can be straightforwardly created (parameter.spawn_child(new_value=new_value))Candidateclass is completely removed, and is completely replaced byParameter#459. This should not break existing code sinceParametercan be straightforwardly used as aCandidate.
- New parametrization is now as efficient as in v0.3.0 (see CHANGELOG for v0.3.1 for contect)
- Optimizers can now hold any parametrization, not just
Instrumentation. This for instance mean that when you doOptimizerClass(instrumentation=12, budget=100), the instrumentation (and therefore the candidates) will be of classng.p.Array(and notng.p.Instrumentation), and their attributevaluewill be the correspondingnp.ndarrayvalue. You can still useargsandkwargsif you want, but it's no more needed! - Added experimental evolution-strategy-like algorithms using new parametrization #471 (the behavior and API of these optimizers will probably evolve in the near future).
DEalgorithms comply with the new parametrization system and can be set to use parameter's recombination.- Fixed array as bounds in
Arrayparameters
Note: this is the first step to propagate the instrumentation/parametrization framework. Learn more on the Facebook user group. If you are looking for stability, await for version 0.4.0, but the intermediary releases will help by providing deprecation warnings.
FolderFunctionmust now be accessed throughnevergrad.parametrization.FolderFunction- Instrumentation names are changed (possibly breaking for benchmarks records)
- Old instrumentation classes now all inherits from the new parametrization classes #391. Both systems coexists, but optimizers use the old API at this point (it will use the new one in version 0.3.2).
- Temporary performance loss is expected in orded to keep compatibility between
VariableandParameterframeworks. PSOnow uses initialization by sampling the parametrization, instead of sampling all the real space. A newWidePSOoptimizer was created, using the previous initial sampling method #467.
Note: this version is stable, but the following versions will include breaking changes which may cause instability. The aim of this changes will be to update the instrumentation system for more flexibility. See PR #323 and Fb user group for more information.
Instrumentationis now aVariablefor simplicity and flexibility. TheVariableAPI has therefore heavily changed, and bigger changes are coming (instrumentationwill becomeparametrizationwith a different API). This should only impact custom-made variables.InstrumentedFunctionhas been aggressively deprecated to solve bugs and simplify code, in favor of using theInstrumentationdirectly at the optimizer initialization, and of usingExperimentFunctionto define functions to be used in benchmarks. Main differences are:instrumentationattribute is renamed toparametrizationfor forward compatibility.__init__takes exactly two arguments (main function and parametrization/instrumentation) and- calls to
__call__is directly forwarded to the main function (instead of converting from data space),
Candidateshave now auidinstead of auuidfor compatibility reasons.- Update archive
keys/items_as_arraymethods tokeys/items_as_arraysfor consistency.
- Benchmark plots now show confidence area (using partially transparent lines).
Chainingoptimizer family enables chaining of algorithms.- Cleaner installation.
- New simplified
Logvariable for log-distributed scalars. - Cheap constraints can now be provided through the
Instrumentation - Added preliminary multiobjective function support (may be buggy for the time being, and API will change)
- New callback for dumping parameters and loss, and loading them back easily for display (display yet to come).
- Added a new parametrization module which is expected to soon replace the instrumentation module.
- Added new test cases: games, power system, etc (experimental)
- Added new algorithms: quasi-opposite one shot optimizers
- instrumentations now hold a
random_stateattribute which can be seeded (optimizer.instrumentation.random_state.seed(12)). Seedingnumpy's global random state seed before using the instrumentation still works (but if not, this change can break reproducibility). The random state is used by the optimizers through theoptimizer._rngproperty.
- added a
Scalarvariable as a shortcut toArray(1).asscalar(dtype)to simplify specifying instrumentation. - added
suggestmethod to optimizers in order to manually provide the nextCandidatefrom theaskmethod (experimental feature, name and behavior may change). - populated
nevergrad's namespace so thatimport nevergrad as nggives access tong.Instrumentation,ng.varandng.optimizers. Theoptimizersnamespace is quite messy, some non-optimizer objects will eventually be removed from there. - renamed
optimizetominimizeto be more explicit. Usingoptimizewill raise aDeprecationWarningfor the time being. - added first game-oriented testbed function in the
functions.rlmodule. This is still experimental and will require refactoring before the API becomes stable.
- changed
tanhtoarctanas default for bounded variables (much wider range). - changed cumulative Gaussian density to
arctanfor rescaling inBO(much wider range). - renamed
Array.asfloatmethod toArray.asscalarand allow casting tointas well through an argument.
- fixed
tell_not_askedforDEfamily of optimizers. - added
dumpandloadmethod toOptimizer. - Added warnings against inefficient settings:
BOalgorithms with dis-continuous or noisy instrumentations without appropriate parametrization,PSOandDEfor low budget. - improved benchmark plots legend.
- first parameter of optimizers is now
instrumentationinstead ofdimension. This allows the optimizer to have information on the underlying structure.ints are still allowed as before and will set the instrumentation to theInstrumentation(var.Array(n))(which is basically the identity). - removed
BaseFunctionin favor ofInstrumentedFunctionand use instrumentation instead of defining specific transforms (breaking change for benchmark function implementation). ask()andprovide_recommendation()now return aCandidatewith attributesargs,kwargs(depending on the instrumentation) anddata(the array which was formerly returned).tellmust now receive this candidate as well instead of the array.- removed
tell_not_askedin favor oftell. A newnum_tell_not_askedattribute is added to check the number oftellcalls with non-asked points.
- updated
bayesion-optimizationversion to 1.0.1. - from now on, optimizers should preferably implement
_internal_ask_candidateand_internal_tell_candidateinstead of_internal_askand_internal_tell. This should take at most one more line:x = candidate.data. - added an
_askedprivate attribute to register uuid of particuels that were asked for. - solved
ArtificialFunctiondelay bug.
- corrected a bug introduced by v0.1.5 for
PSO. - activated
tell_not_askforPSO,TBPSAand differential evolution algorithms. - added a pruning mechanisms for optimizers archive in order to avoid using a huge amount of memory.
- corrected typing after activating
numpy-stubs.
- provided different install procedures for optimization, benchmark and dev (requirements differ).
- added an experimental
tell_not_askedmethod to optimizers. - switched to
pytestfor testing, and removed dependency tonosetestsandgenty. - made archive more memory efficient by using bytes as key instead of tuple of floats.
- started rewritting some optimizers as instance of a family of optimizers (experimental).
- added pseudotime in benchmarks for both steady mode and batch mode.
- made the whole chain from
OptimizertoBenchmarkChunkstateful and able to restart from where it was stopped. - started introducing
tell_not_askedmethod (experimental).
- fixed
PSOin asynchronous case - started refactoring
instrumentationin depth, and more specifically instantiation of external code (breaking change) - Added Photonics and ARCoating test functions
- Added variants of algorithms
- multiple bug fixes
- multiple typo corrections (including modules changing names)
- added MLDA functions
- allowed steady state in experiments
- allowed custom file types for external code instantiation
- added dissymetric noise case to
ArtificialFunction - prepared an
Instrumentationclass to simplify instrumentation (breaking changes will come) - added new algorithms and benchmarks
- improved plotting
- added a transform method to
BaseFunction(more breaking changes will come)
Work on instrumentation will continue and breaking changes will be pushed in the following versions.
Initial version