Skip to content

Releases: PEtab-dev/petab_select

PEtab Select v0.2.1

19 Nov 08:32
be0df58
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.2.0...v0.2.1

PEtab Select v0.2.0

18 Nov 23:43
29aff05
Compare
Choose a tag to compare

There are some major breaking changes, to support users providing previous calibration results, e.g. from previous model selection runs. The following changes are reflected in the notebook examples.

  • breaking change previously, calibration tools would call candidates at each iteration of model selection. candidates has now been renamed to start_iteration, and tools are now expected to run end_iteration after calibrating the iteration's models. This structure also simplifies the codebase for other features of PEtab Select.
  • breaking change previously, calibration tools would determine whether to continue model selection based on whether the candidate space contains any models. Now, calibration tools should rely on the TERMINATE signal provided by end_iteration to determine whether to continue model selection.
  • breaking change PEtab Select hides user-calibrated models from the calibration tool, until end_iteration is called. Hence, if a calibration tool does some analysis on the calibrated models of the current iteration, the tool should use the MODELS provided by end_iteration, and not the MODELS provided by start_iteration.
    In summary, here's some pseudocode showing the old way.
from petab_select.ui import candidates
while True:
    # Get iteration models
    models = candidates(...).models
    # Terminate if no models
    if not models:
        break
    # Calibrate iteration models
    for model in models:
        calibrate(model)
    # Print a summary/analysis of current iteration models (dummy code)
    print_summary_of_iteration_models(models)

And here's the new way. Full working examples are given in the updated notebooks, including how to handle the candidate space.

from petab_select.ui import start_iteration, end_iteration
from petab_select.constants import MODELS, TERMINATE
while True:
    # Initialize iteration, get uncalibrated iteration models
    iteration = start_iteration(...)
    # Calibrate iteration models
    for model in iteration[MODELS]:
        calibrate(model)
    # Finalize iteration, get all iteration models and results
    iteration_results = end_iteration(...)
    # Print a summary/analysis of all iteration models (dummy code)
    print_summary_of_iteration_models(iteration_results[MODELS])
    # Terminate if indicated
    if iteration_results[TERMINATE]:
        break
  • Other major changes
    • Many thanks to @dweindl for:
    • visualizations, examples in the gallery: https://petab-select.readthedocs.io/en/develop/examples/visualization.html
    • fixed a bug introduced in 0.1.8, where FAMoS "jump to most distant" moves were not handled correctly
    • the renamed candidates->start_iteration:
      • no longer accepts calibrated_models, as they are automatically stored in the CandidateSpace now with each end_iteration
      • calibrated_models and newly_calibrated_models no longer need to be tracked between iterations. They are now tracked by the candidate space.
      • exclusions via exclude_models is no longer supported. exclusions can be supplied with set_excluded_hashes
    • model hashes are more readable and composed of two parts:
      1. the model subspace ID
      2. the location of the model in its subspace (the model subspace indices)
    • users can now provide model calibrations from previous model selection runs. This enables them to skip re-calibration of the same models.

What's Changed