Repository navigation
Release notes for sbmlsim 0.59.0
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.
OptimizationProblemwrites 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 bysbmlsim_core.fitproblemon it. The repeats of a fit run next to each other on the threads of the engine, aCustomobservable 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
best1binwith 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_coresof a fit and of its analyses counts the threads of sbmlsim-core; a parallel fit no longer needs theif __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(...)andFitDefinition(engine=...)of roadrunner, COPASI or AMICI raiseValueError;Projectno longer passes its simulator engine to its fit definitions. To check a fit with another engine, run its experiments withSimulator(engine=...). - The switches of the removed python paths are refused.
engine_fit=False,engine_profiles=Falseandengine_jacobian=Falseon the API, the CLI flags--no-engine-fit,--no-engine-profilesand--no-engine-jacobianand the run-layer spec fields (the plans offit,identifiabilityandfisherrefuse them before any work runs);ProfileSettings(scan_timeout=...)is refused inprofile_likelihoodand in thefitandidentifiabilityplans, usetimeout, 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,gtolandmax_nfev; differential evolutionmaxiter,popsize,tol,atol,mutation(in[0, 2)),recombinationandpolish("least_squares"orFalse). Refused: amethodother thantrf(e.g.lm,dogbox), ajacother than2-point(e.g.3-point, a callable),workers(including the1andNone0.58 allowed),updating,strategyorinitother than the defaults,polish=True(L-BFGS-B) and any callable. This affects theoptimizer:blocks of workflow specs. - Removed modules.
sbmlsim.fit.sampling(SamplingTypeis insbmlsim.fit.options,create_samplesis replaced byOptimizationProblem.start_values),sbmlsim.fit.pool,sbmlsim.fit.observable_sbml,sbmlsim.fit.reductions, and most ofsbmlsim.fit.fit_core(fit_request,gaps_of*,residual_jacobian,profile_points,walk_of, thereads_*gates and the observable and kept group helpers; onlylikelihood_constantand_factors_ofremain). - Removed from the runner.
FitPool,split_cores,JacobianPool,PopulationPool,PoolError,WorkerDiedandjacobian_width. - Other removed APIs.
PredictiveCheck.subjects,SubjectPredictions,variability.subject_predictions,Variability.draw; the argumentssettings=,pool=andkey=ofpredictive_check;FitMetrics(evaluation=);credibility.verification.second_method_reason;posterior.prior_hessian,posterior.BOUND_TOLERANCE,fisher.data_residuals,identifiability.first_steps,priors.prior_median,prior_supportanduntruncated_log_density; theworkersandpoolarguments ofcredibility.uncertainty.propagate_fits; in the simulatorPlan.places,Plan.scaled,Plan.until,Place,PlaceKind,engines.execute_plans,executor_core.execute_many,requests_of,is_formed,form_ofandformula.linear_form. - Problems refused at
initialize(aCoreProblemError, aValueError) 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_coresof 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_seedsisNoneandx0isNone. - Statuses. The
statusandmessageof a run are status names (SolverConverged,MaxIter,Failed, ...); a differential evolution stopped atmaxiteris not a success. - No traces in new reports. New fits have no trajectories:
df_tracesis 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_sizehas no effect.- Profiles report their progress and call
on_profileonly once the whole analysis has answered; inside a re-optimization a failed evaluation is the residual1e3.
Migration
from sbmlsim.fit.sampling import SamplingTypebecomesfrom sbmlsim.fit.options import SamplingType(pkpdsimcli.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_timeoutand the refused optimizer arguments from scripts and workflow specs. - Do not
--resumea 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
footerof 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.simulateis learned per uncertainty by simrun (#746): the kindsimulatenamesuncertaintyas 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 issimrun>=0.6.2; sys_platform != 'win32', and the tests of the plugin which used its removed modules drive the task types throughsimrun.unit_serve. simrun 0.6.1 adds--versionto 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 extrasimrun.