Release notes#

Release notes for the published versions of nextnano optimizers.

Version 1.0.0 (November 24th 2026)#

  • requires nextnanopy 1.7.0 or newer.

Version 0.19.0 (November 24th 2026)#

  • breaking: Metric describes its objectives with one integer, num_obj, and its signature is now Metric(input_shape, num_obj, extraction_function=None). Both input_shape and num_obj are required. output_shape, input_length and output_length are removed, as parameters and as attributes:

    • Metric(input_length=k, output_length=p) becomes Metric(input_shape=(k,), num_obj=p).

    • Metric(output_shape=(p,)) becomes Metric(input_shape=(1,), num_obj=p), keeping whatever input_shape the call already passed.

    • Metric(extraction_function=f), which relied on the defaults, becomes Metric(input_shape=(1,), num_obj=1, extraction_function=f).

    • metric.input_length becomes metric.input_shape[0], and metric.output_length becomes metric.num_obj.

    num_obj must be an integer of at least 1.

  • breaking: IO takes output_files in place of target_output_paths, and each output file is one /-delimited string rather than a tuple of path components. IO(..., target_output_paths=[("bias_00000", "potential.dat")]) becomes IO(..., output_files=["bias_00000/potential.dat"]). Each string is the file’s path relative to the simulation output directory, with / between folder levels; a top-level file is just its name, "variables_input.txt" rather than ("variables_input.txt",). The IO.target_output attribute is renamed IO.output_files and the IO.number_of_output_targets property IO.number_of_output_files.

  • breaking: the IO.input_variable_names attribute is renamed IO.variable_names and the IO.number_of_input_variables property IO.number_of_variables.

  • breaking: the plotting keyword arguments fitness_names, fitness_limits and fitness_log_scale are renamed objective_names, objective_limits and objective_log_scale, accepted by OptimizationPlotter, setup_plotting() and watch_progress(). The generated default objective labels and the .dat column headers change from fitness1..M to objective1..M to match.

Version 0.18.0 (November 19th 2026)#

  • Evolution accepts four more algorithms: "de" (differential evolution), "pso" (particle swarm optimization), "cmaes" (CMA-ES) and "smsemoa" (SMS-EMOA), next to "ga" and "nsga2". "default" still means "ga" for one objective and "nsga2" for several.

  • botorch is now a core dependency, so BayesianOptimization works after a plain pip install nextnano_optimizers. The [bayesian] extra is removed. An old pip install nextnano_optimizers[bayesian] still installs everything; pip only warns that the extra does not exist. Every install now includes PyTorch.

  • matplotlib is now a core dependency, and the [plot] extra is removed. An old pip install nextnano_optimizers[plot] still installs everything; pip only warns that the extra does not exist.

Version 0.17.0 (November 16th 2026)#

  • breaking: Evolution.run no longer takes initial_guess. Seed the initial population with pymoo’s own sampling instead: Evolution.run(..., algorithm_kwargs={"sampling": np.array([...])}). The array has one row per candidate and one column per input variable.

    An array sampling is checked before the run starts: it must be numeric, of shape (n_points, n_variables) and within the bounds, or run raises. A list or tuple is rejected rather than converted. The number of points is no longer limited to size. A pymoo sampling operator passes through unchecked.

  • requires nextnanopy 1.6.0 or newer.

Version 0.16.0 (November 11th 2026)#

  • plotting takes fitness_log_scale, which draws an objective on a logarithmic axis – in the progress panels, in the objective-space figure and in the live window alike. It is keyed like fitness_limits: True for every objective, a list of one flag per objective, or a dictionary keyed by fitness name or index. Accepted by OptimizationPlotter, setup_plotting() and watch_progress().

    A logarithmic axis cannot show a value that is zero or negative. Such values are left out of that objective’s panel – of the curves summarizing it as much as of the points drawn from it – and a warning names the objective and how many were dropped. The evaluation itself is not removed: the other objectives’ panels and the parameter panels still draw it, and the excluded-evaluations panel does not count it.

Version 0.15.0 (November 9th 2026)#

  • breaking: the license path is read from the nextnano optimizers section of the nextnanopy configuration, not from nextnanoevo. Set it with nn.config.set("nextnano optimizers", "license", ...) followed by nn.config.save(). The section arrives in nextnanopy 1.5.0, which is now the minimum supported version.

  • breaking: IO.load_output_datafiles() always returns a single numpy.ndarray. For a 2D input – a whole population – it is one array of shape (N, k, *sweep_shape) with the candidates on the leading axis, instead of a list of N separate arrays. Indexing and iteration are unchanged (datafiles[i] is still that candidate’s (k, *sweep_shape) array, len(datafiles) is still N), so loops over the result and Metric extraction functions keep working; code that called a list method such as .append() on the result, or tested it for being a list, does not.

  • breaking: a candidate whose simulation failed is no longer None in that result. Its slice keeps the full (k, *sweep_shape) shape and every entry in it is None, so a failed candidate is detected with datafiles[i].ravel()[0] is None rather than datafiles[i] is None. A 1D input still raises RuntimeError when its simulation failed, and execution_codes is unchanged.

  • breaking: Evolution.run() no longer takes interval. The accumulated Pareto front is updated after every generation, which is what the default interval=1 already did, so a run that did not pass it is unchanged. Because interval sat in second position, a positional run(50, 2) now sets the seed rather than the update interval – calls that pass seed by keyword are unaffected. A value above 1 did not merely postpone the update: the skipped generations’ candidates were never offered to the front at all, so they could not appear in pareto_solutions, and keep_output="pareto" deleted their simulation output along with it.

  • LocalOptimizer rejects a multi-objective metric when it is constructed rather than on the first run() call, matching BayesianOptimization. The exception is the same ValueError; only the point it is raised from moved. The x0 check still happens in run(), which is where x0 is passed.

Version 0.14.0 (November 6th 2026)#

  • breaking: BayesianOptimization drives BoTorch directly instead of going through Ax, and the optional extra installs botorch rather than ax-platform:

    pip install nextnano_optimizers[bayesian]
    

    An existing environment needs that install. The method is the same – a quasi-random initial design, then a Gaussian-process surrogate with a log-expected-improvement acquisition function – but it is not the same sequence of candidates: a run repeated with the seed it used before this release evaluates different designs and reports a different champion.

  • breaking: BayesianOptimization.ax_client is gone, and run() no longer returns a "client" key – the result is champion_x and champion_f. Every trial is already recorded in the run’s Simulation_*.json and Simulation_*.dat, which plot_all() draws from.

  • breaking: the JSON summary drops ax_best_parameterization, the model-predicted best point that Ax reported alongside the observed champion. The champion is the design whose objective was actually measured, and that is what the summary records. The summary gains n_initial.

  • breaking: run() takes a new n_initial parameter in second position, setting how many trials go to the initial design before the surrogate model takes over (default 5; Ax decided this internally and it could not be configured). Because it sits second, a positional run(20, 42) now sets the initial-design size rather than the seed – calls that pass seed by keyword are unaffected.

  • BayesianOptimization.run() takes acquisition and acquisition_kwargs: "LogEI" (the default) refines around the best trial so far, "UCB" keeps probing where the model is uncertain and accepts beta (default 2.0). The JSON summary records both.

  • breaking: EvolutionPlotter is gone. OptimizationPlotter draws every optimizer’s run, and the new OptimizationPlotter.from_optimizer replaces EvolutionPlotter.from_evolution for all three of them: OptimizationPlotter.from_optimizer(evolution).plot_all(). A log records the run and not which optimizer wrote it, so the subclass only ever knew the evolution wording because the caller had picked the class.

  • figures drawn through an optimizer are unchanged: Evolution.plot_all() still titles its progress figure Evolution progress and calls an iteration a generation. Plotting a log directly words itself neutrally, as it already did for LocalOptimizer and BayesianOptimization; pass iteration_label and progress_title to say otherwise.

  • EvolutionPlotter.from_evolution no longer fills the Pareto highlights from the Evolution object when the run’s log summary does not carry them. Every plotted value comes from the log. A completed run’s figures are unchanged — its summary carries the front — while a run that raised before writing its summary draws its figures with the final population scattered and no front emphasized on top.

  • Evolution.plot_all now reports a run it cannot plot the way the other two optimizers already did: on a log holding no evaluated candidate — a run whose first generation failed — it raises RuntimeError saying so rather than IndexError from inside the plotting layer, and before run has produced a log it raises RuntimeError rather than AttributeError.

  • Evolution.setup_plotting and Evolution.plot_all are the same methods the other two optimizers use, so the three document and behave alike. The figures are unchanged, and Evolution’s API page now lists them.

  • an Evolution plotted without setup_plotting now labels its parameter axes with the input-variable names from its IO, as LocalOptimizer and BayesianOptimization already did, instead of param1, param2, … This applies to the figures and to the live window alike, and setup_plotting(param_names=[...]) still overrides it. The objectives keep fitness1, fitness2, … — a multi-objective run has no names for them anywhere, so name them yourself with setup_plotting(fitness_names=[...]).

Version 0.13.0 (October 12th 2026)#

  • every run now writes into a folder of its own, named after the input file and the optimizer — {input_file_name}_evolution/, {input_file_name}_optimization/, {input_file_name}_bayesian/ — created in the output directory configured in nextnanopy.

  • the three optimizers accept output_dir to create that folder somewhere other than the configured output directory: Evolution(io, metric, bounds, output_dir="runs").

  • IO.run_simulation accepts start_index, which numbers the generated input files — and so the simulation output folders nextnanopy names after them — from the given index, zero-padded to five digits: input_file_stem="sim", start_index=1 yields sim_00001, sim_00002

  • plot_all() now saves the figures. With no save_dir they are written into a figures subfolder of the run’s folder; previously the default drew them without saving anything.

  • the saved figures are named after what they show — progress, pareto and inputs — instead of after the run’s log (Simulation_2026_10_08_153958_progress.png). The folder is what identifies the run, so plotting two runs into one save_dir of your own now leaves only the figures of the last.

  • breaking: save_dir="next_to_log" is no longer saves the figures next to a logs. It is an ordinary relative directory name like any other string, so code still passing it writes the figures into ./next_to_log/ rather than next to the log.

Version 0.12.0 (September 24th, 2026)#

  • a LocalOptimizer run now writes the same .log / .json / .dat trio as Evolution and BayesianOptimization, in the same JSON schema: one gen{n} key per function evaluation, one candidate per key, plus a summary section carrying the champion, the initial guess, the method and what scipy returned. A single scipy iteration covers several evaluations — a finite-difference gradient costs one simulation per input variable on top of the iterate — so the evaluation, not the iteration, is what the log records.

  • LocalOptimizer gains champion_x and champion_f: the best evaluated candidate, which is not always the point OptimizeResult.x reports, since a method may take a final step that does not improve the metric.

  • LocalOptimizer.run accepts live_progress=True: the progress viewer opens during the run and closes with it, as it already did for Evolution and BayesianOptimization.

  • LocalOptimizer.setup_plotting and LocalOptimizer.plot_all draw a local run for its own shape: the function evaluations (labelled evaluations, drawn as a connected line) and the best-so-far, without the mean/median/min-max curves that would each summarize a single evaluation. The axis counts function evaluations rather than scipy iterations, which is what the log records.

  • plot_all on a log holding no evaluated candidate — a run whose first simulation failed — raises RuntimeError saying so, rather than IndexError from inside the plotting layer. Applies to LocalOptimizer and BayesianOptimization.

Version 0.11.0 (September 23rd, 2026)#

  • breaking: Optimizer is now LocalOptimizer and wraps only scipy.optimize.minimize. Root finding (optimization_method="root" / "root_scalar") is gone, and with it both constructor arguments that selected the method: LocalOptimizer(nextnanoio, metric) now takes exactly two arguments.

  • breaking: LocalOptimizer.set_target is gone. Fold the target into the metric — an extraction function returning abs(value - target) — so the objective is the distance to the target and the minimizer drives it to zero.

  • breaking: set_optimization_parameters is gone; run takes the arguments instead — optimizer.run(x0=[10.0], bounds=[(5, 20)], method="Nelder-Mead"), forwarded to scipy.optimize.minimize.

  • breaking: run_optimization is gone. run is the single entry point and returns the scipy.optimize.OptimizeResult.

  • breaking: validate_optimization is gone. A non-scalar metric, or an x0 whose length does not match the input variables, raises ValueError from run.

  • breaking: the nextnano_optimizers.bayesian module is gone. BayesianOptimization is imported from nextnano_optimizers.optimizer, the one module that now provides all three optimizers.

  • breaking: the IO.output_datafiles property is now the method IO.load_output_datafiles(): it reads and parses the output files from disk on every call, which an attribute access should not do.

  • breaking: IO.get_target is gone; it only returned the output datafiles. Use IO.load_output_datafiles().

  • breaking: a number of methods that were public but are only ever called by an optimizer during its own run have become internal, so that what the documentation lists is what you are meant to call. Nothing used to set up or drive a run is affected.

  • the example input files are updated for nextnano++ 3.0.0.

Version 0.10.0 (August 28th, 2026)#

  • BayesianOptimization.run accepts live_progress=True: the progress viewer opens during the run and closes with it, as it already did for Evolution.

  • Bayesian runs are plotted for their own shape: the trial values (labelled samples, drawn as a connected line) and the best-so-far, without the mean/median/min-max curves that would each summarize a single evaluation.

  • new OptimizationPlotter, the optimizer-agnostic base of EvolutionPlotter: use it to plot any run’s log, Bayesian included.

  • progress curves can be relabelled and restyled per run (series_labels, series_specs), and the surrounding wording set with iteration_label, progress_title and population_label.

  • breaking: the plotter’s summary, n_params, n_obj, param_names, fitness_names, n_failed and n_limited moved onto its run attribute — plotter.n_obj is now plotter.run.n_obj.

Version 0.9.0 (August 7th, 2026)#

  • BayesianOptimization.run accepts a target: the run stops early once the objective drops to or below it, instead of always exhausting the trials budget.

Version 0.8.1 (August 5th, 2026)#

  • support python 3.14.

Version 0.8.0 (July 29th, 2026)#

  • Bayesian optimization gains setup_plotting, matching Evolution: configure the result figures once (param_names, fitness_names, progress_series, fitness_limits) and plot_all draws with it.

  • plot_all accepts fig_format to save the figures as pdf/svg/jpg/… (any format matplotlib supports); defaults to png.

Version 0.7.0 (July 24th, 2026)#

  • progress plot “best” curve is now the best-so-far (running best over generations), not the per-generation best.

  • live progress viewer closes when the run finishes, and shows a placeholder until the first generation completes.

  • integer ticks on the excluded-evaluations progress panel.

  • experimental Bayesian optimization (Ax-based), opt-in via pip install nextnano_optimizers[bayesian].

Version 0.6.0 (July 21st, 2026)#

  • improve failed simulation error handling.

  • the package is renamed to nextnano_optimizers.

Version 0.5.3 (July 10th, 2026)#

  • bugfixes.

Version 0.5.2 (July 9th, 2026)#

  • progress plot in separate process.

Version 0.5.1 (July 9th, 2026)#

  • fitness limits for plotting.

  • choice of series for progress plotting.

  • other small adjustments in plotting.

Version 0.5.0 (July 8th, 2026)#

  • live progress and evolution results plotting.

  • improved keep_pareto handling.

Version 0.4.3 (July 7th, 2026)#

  • bugfixes.

Version 0.4.2 (July 7th, 2026)#

  • bugfixes.

Version 0.4.0 (May 4th, 2026)#

  • support multiple simulations per fitness via sweeps.

  • adapt Metric API to support multiple simulations.

Version 0.3.3 (April 10th, 2026)#

  • bug fixes.

Version 0.3.2 (April 7th, 2026)#

  • bug fixes.

Version 0.3.1#

  • bug fixes.

Version 0.3.0#

  • switch from pygmo to pymoo.

Version 0.2.0#

  • bug fixes.

  • improved output.

Version 0.1.12#

  • bug fixes.

  • added champion to evolution.

  • extra: data generation for ML.

  • added clean-up of input files after simulation.

Version 0.1.11#

  • extraction function in evolution is now strictly enforced to return numpy.array.

Version 0.1.10#

  • added non_execution_penalty to Evolution.run(..., non_execution_penalty=number), where number is the fitness assigned to the candidates without successful execution of the input file. If non_execution_penalty is not specified, an execution error of the input file leads to an error of the Evolution.

  • added the Simulation*.json history file. The file duplicates the Simulation*.log info, but saves it in a more computer readable format.

  • added the Simulation*.dat history file in column format: (idx, generation, param1, param2, … paramn, fitness1, …, fitnessk).

Version 0.1.9#

  • added algorithm_kwargs, Evolution.run(..., algorithm_kwargs={'cr': 0.95, ...}).

  • added the initial guess feature to evolution, Evolution.run(..., initial_guess=[solution_guess1, solution_guess2, ...]). The length of the initial guess should be equal to or less than the size of the Evolution.