pypi sbmlsim 0.59.0

one hour ago

Release notes for sbmlsim 0.59.0

sbmlsim

The fit runs in sbmlsim-core: an initialized OptimizationProblem is written as the document fitproblem/1, which sbmlsim-core plans from 0.48.0 on, fits with the optimizers of scipy and analyses, so every fit, profile likelihood, Fisher information, Laplace posterior, table of metrics and predictive check runs in the engine core on its threads, and the python paths of the fit, its pools of processes and its planner of the requests are gone.

Changes

  • The fit of a document. OptimizationProblem writes its declarative description, fitproblem/1 (sbmlsim.fit.problem_contract.fit_problem), and the fit, the re-optimizations of a profile, the jacobian of the Fisher information, the posterior, the metrics and the predictive check are answered by sbmlsim_core.fitproblem on it. The repeats of a fit run next to each other on the threads of the engine, a Custom observable and the derived values of a hybridization are answered by python through ask and tell, and the start values of a least squares fit are bitwise those of 0.57 and 0.58.
  • The optimizers of scipy in Rust. Least squares is the trust region reflective of scipy and differential evolution scipy's best1bin with the least squares polish of sbmlsim, both of sbmlsim-core, with the defaults of sbmlsim.
  • Where a fit ran. The methods of a report regenerated from a record whose optimizer ran in python name SciPy, a fit of the engine sbmlsim-core and a combined result both.
  • No pools of processes for a fit. n_cores of a fit and of its analyses counts the threads of sbmlsim-core; a parallel fit no longer needs the if __name__ == "__main__": guard, and the posterior of a run of the run layer is computed on the workers of the run.
  • The page outputs. The pages no longer print the wall clock time of a fit, so their outputs do not change with every run of the script, and the fit fixtures are kept byte for byte on every checkout.

Breaking changes

  • Fits evaluate only in the engine core. OptimizationProblem(engine=...), set_simulator(...) and FitDefinition(engine=...) of roadrunner, COPASI or AMICI raise ValueError; Project no longer passes its simulator engine to its fit definitions. To check a fit with another engine, run its experiments with Simulator(engine=...).
  • The switches of the removed python paths are refused. engine_fit=False, engine_profiles=False and engine_jacobian=False on the API, the CLI flags --no-engine-fit, --no-engine-profiles and --no-engine-jacobian and the run-layer spec fields (the plans of fit, identifiability and fisher refuse them before any work runs); ProfileSettings(scan_timeout=...) is refused in profile_likelihood and in the fit and identifiability plans, use timeout, which gives up the scans not yet begun. Records with these fields still read.
  • Only the optimizer arguments sbmlsim-core runs are accepted. Least squares takes x_scale, diff_step, ftol, xtol, gtol and max_nfev; differential evolution maxiter, popsize, tol, atol, mutation (in [0, 2)), recombination and polish ("least_squares" or False). Refused: a method other than trf (e.g. lm, dogbox), a jac other than 2-point (e.g. 3-point, a callable), workers (including the 1 and None 0.58 allowed), updating, strategy or init other than the defaults, polish=True (L-BFGS-B) and any callable. This affects the optimizer: blocks of workflow specs.
  • Removed modules. sbmlsim.fit.sampling (SamplingType is in sbmlsim.fit.options, create_samples is replaced by OptimizationProblem.start_values), sbmlsim.fit.pool, sbmlsim.fit.observable_sbml, sbmlsim.fit.reductions, and most of sbmlsim.fit.fit_core (fit_request, gaps_of*, residual_jacobian, profile_points, walk_of, the reads_* gates and the observable and kept group helpers; only likelihood_constant and _factors_of remain).
  • Removed from the runner. FitPool, split_cores, JacobianPool, PopulationPool, PoolError, WorkerDied and jacobian_width.
  • Other removed APIs. PredictiveCheck.subjects, SubjectPredictions, variability.subject_predictions, Variability.draw; the arguments settings=, pool= and key= of predictive_check; FitMetrics(evaluation=); credibility.verification.second_method_reason; posterior.prior_hessian, posterior.BOUND_TOLERANCE, fisher.data_residuals, identifiability.first_steps, priors.prior_median, prior_support and untruncated_log_density; the workers and pool arguments of credibility.uncertainty.propagate_fits; in the simulator Plan.places, Plan.scaled, Plan.until, Place, PlaceKind, engines.execute_plans, executor_core.execute_many, requests_of, is_formed, form_of and formula.linear_form.
  • Problems refused at initialize (a CoreProblemError, a ValueError) which 0.58 ran degenerate in python: training data of an infinite weight (an error of exactly zero under error weighting) or of a weight which is no number, training data of a zero mean with normalized residuals, and a measurement of zero under a log noise.
  • No analysis of a failed evaluation. The Fisher information, the posterior and the metrics at a parameter set whose evaluation fails are refused (0.58 gave numbers computed from the failure residuals).
  • Defaults. credibility.assess(workers=None) uses every CPU; n_cores of fits and analyses counts the threads of sbmlsim-core, not processes.
  • Requires sbmlsim-core 0.49.0.

Changed results

  • Optima agree with scipy within the optimizer tolerance, not bitwise: the optima of 0.58 came from scipy in python, the documentation outputs moved in their last digits, and the pages no longer print the optimizer time of a fit.
  • The starts of least squares are bitwise those of 0.57 and 0.58.
  • Differential evolution draws its population from the stream of the seed advanced by the run index: its runs differ from 0.58, run_seeds is None and x0 is None.
  • Statuses. The status and message of a run are status names (SolverConverged, MaxIter, Failed, ...); a differential evolution stopped at maxiter is not a success.
  • No traces in new reports. New fits have no trajectories: df_traces is empty and the figure of the traces is absent; old records keep theirs.
  • The Fisher jacobian without forward sensitivities is the central differences of the engine.
  • variable_step_size has no effect.
  • Profiles report their progress and call on_profile only once the whole analysis has answered; inside a re-optimization a failed evaluation is the residual 1e3.

Migration

  • from sbmlsim.fit.sampling import SamplingType becomes from sbmlsim.fit.options import SamplingType (pkpdsim cli.py; no other removed name is used in pkpdsim or pkdb_models).
  • A fit with another engine than the engine core runs its experiments with Simulator(engine=...) instead.
  • Drop engine_fit=False, engine_profiles=False, engine_jacobian=False, the CLI flags --no-engine-*, scan_timeout and the refused optimizer arguments from scripts and workflow specs.
  • Do not --resume a differential evolution fit started with 0.58 or earlier: the new repeats draw other populations.
  • The analyses run on threads: a script which gave the workers of a pool gives the threads of sbmlsim-core with the same n_cores.

Other changes since 0.58.0

  • The factory kind warns of the files the rebuild did not write (#740), not of every project without declared outputs: Project.unwritten_outputs(out) names the tracked files of the factory directory which the factory no longer writes.
  • The footer of the web app is in the column of the app, slotted into the slot footer of sbmlsim-web (#741).
  • sbmlsim-web 0.7.1 to 0.7.4 (#741, #742, #744, #745): the form fields of the app named, a named stop places the thumb of its slider exactly, the tab row stays one line on a phone, a panel keeps its table of parameters through a switch of the variant, and the settings card sits naturally on a phone before the first run. A subtitle of a panel names no value of a knob.
  • The cost of sbmlsim.simulate is learned per uncertainty by simrun (#746): the kind simulate names uncertainty as its cost setting.
  • simrun 0.4.1, 0.5.0, 0.6.0, 0.6.1 and 0.6.2 in the extra simrun (#743, #747, #749). simrun 0.6.0 retired its python implementation: only the package of its plugins remains, with its binaries and no wheel for Windows, so the extra is simrun>=0.6.2; sys_platform != 'win32', and the tests of the plugin which used its removed modules drive the task types through simrun.unit_serve. simrun 0.6.1 adds --version to every binary, 0.6.2 fixes its web app and records the backend of a run.

Dependencies

  • sbmlsim-core>=0.49.0: the planner of a fit, the optimizers of scipy and the analyses of a fit of 0.48.0, and the bindings of the stepper of the engine of 0.49.0, which change nothing of the fit.
  • simrun>=0.6.2; sys_platform != 'win32' in the extra simrun.

Don't miss a new sbmlsim release

NewReleases is sending notifications on new releases.