Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature gst checkpointing #347

Merged
merged 22 commits into from
Sep 19, 2023
Merged

Feature gst checkpointing #347

merged 22 commits into from
Sep 19, 2023

Commits on Aug 16, 2023

  1. Initial implementation of checkpointing for GST

    Initial implementation of checkpointing for GST. This initially implementation targets the GateSetTomography protocol specifically and future updates will add support for additional protocols. To support the checkpointing functionality a new generator function version of the iterative GST algorithm has been implemented to enable lazy evaluation. This commit also introduces a new ProtcolCheckpoint parent class and the GateSetTomographyCheckpoint class. Each protocol requires a somewhat different set of information to enable it to checkpoint properly during runtime, so the current vision is that each protocol will have a specialized checkpoint object associated with it.
    Corey Ostrove committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    1cd09fb View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Minor refactor of the GST checkpointing

    Minor revision to restructure some of the control logic for the checkpointing.
    Corey Ostrove committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    c530cb8 View commit details
    Browse the repository at this point in the history
  2. Implementation of checkpointing for ModelTest protocols

    An initial implementation of checkpointing for model testing. This really only saves intermediate objective function values, as that was all I identified that was either a) computationally worth checkpointing or b) safe to checkpoint given concerns about being independent of layout specific configuration details in resource alloc etc.
    Corey Ostrove committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    477228f View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Initial implementation of StandardGST checkpointing

    This commit adds an initial implementation of the StandardGSTCheckpointing object and it's use in the StandardGST protocol. Also includes a few bug fixes for the implementations of GateSetTomographyCheckpoint and ModelTestCheckpoint. The idea behind the implementation of the StandardGSTCheckpoint is to treat it as a container for some number of checkpoint objects for each of the sub-protocols run during StandardGST. To facilitate this I have also added a 'parent' attribute to the base ProtocolCheckpoint object to enable a link between child objects and their parents. This is primarily used at present to swap the child's write method with that of the parent's (which invokes the parent's serialization instead) when a parent checkpoint is present. Bugfixes were related to a mistake in using mutable objects as default kwarg values.
    Corey Ostrove committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    929fa0b View commit details
    Browse the repository at this point in the history
  2. Deprecate use of comma-separated string for modes

    The old behavior for the modes argument is kind of wonky and doesn't have any analogues in the code that I can recall. This switches the argument to take either an iterable or a single string (i.e. for specifying a single-mode), and adds a deprecation warning about the comma-separated version.
    Corey Ostrove committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    62d58cf View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. MPI support

    Properly manage file access for MPI compatibility.
    Corey Ostrove committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    fc18335 View commit details
    Browse the repository at this point in the history
  2. Update docstrings

    Updates the docstrings for new checkpointing functionality.
    Corey Ostrove committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    c91af25 View commit details
    Browse the repository at this point in the history
  3. Add plumbing for checkpoints to drivers

    Adds in the plumbing for passing in checkpoint objects to the driver function based interface.
    Corey Ostrove committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    89e9cd7 View commit details
    Browse the repository at this point in the history
  4. Add flag for disabling checkpointing

    When this is set to True checkpoint objects are neither created nor written to disk. If there are values passed in for the checkpoint and checkpoint_path kwarg these are ignored entirely.
    Corey Ostrove committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    7d2e1e5 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Add unit tests for checkpointing

    This adds some unit tests for the checkpointing functionality. Decided to add this to the drivers test package for simplicity. Only test we may want to revisit is for the StandardGSTCheckpoint, which uses log-likelihoods temporarily due to unexpected sign behavior with CPTPLND parameterized models. May also want to add tests for when checkpoints are disabled and such, but then that is already largely covered already. Also refactored a few other tests to bring them in line with the recent deprecations of comma-separated strings for modes on StandardGST.
    Corey Ostrove committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    bf888fa View commit details
    Browse the repository at this point in the history
  2. Update tutorial and example notebooks

    Update tutorial notebooks to reflect new StandardGST syntax.
    Corey Ostrove committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    d63d427 View commit details
    Browse the repository at this point in the history
  3. Python 3.7 and 3.8 compatibility

    I was inadvertently using a method that is only in pathlib for 3.9+, switch to a call that is compatible with older versions.
    Corey Ostrove committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    285c5b6 View commit details
    Browse the repository at this point in the history
  4. Try overriding linter

    Pretty sure this is a false positive in flake8, not sure why else there would be a syntax error...
    Corey Ostrove committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    880b90b View commit details
    Browse the repository at this point in the history
  5. Try bypassing linter again

    Corey Ostrove committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    db3ee87 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Remove errant print statement

    Remove errant print statement from test file (which incidentally breaks on older versions of python).
    Corey Ostrove committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    efb0942 View commit details
    Browse the repository at this point in the history
  2. Delete GateSetTomography_iteration_4.json

    I seem to have added this file by accident...
    Corey Ostrove committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    57b9a9f View commit details
    Browse the repository at this point in the history
  3. Add checkpointing to tutorials

    Add sections on checkpointing an its usage to the tutorials on GST and model testing protocols. Also makes a minor change to one of the unit tests that is inexplicably failing on older python versions.
    Corey Ostrove committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    a58d1fc View commit details
    Browse the repository at this point in the history
  4. Re-enable checkpointing on the updated tutorials

    Remove some of the disable_checkpointing flags I had added to the earlier parts of the of updated tutorials. I am still concerned we might run into file access collisions since we're running the notebook test suite with multiple processes, but I am more worried about accidentally shaping user behavior negatively. Most of our users will copy and paste directly from the tutorials and assume the disable_checkpointing flags are important/needed, and that is worse than weird testing behavior to debug.
    Corey Ostrove committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    c26a048 View commit details
    Browse the repository at this point in the history
  5. Update a few more tutorial notebooks

    Bugfix and refactoring for deprecated mode labels.
    Corey Ostrove committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    a17955c View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Update GOpt-NonIdealTargets.ipynb

    Fix minor typo in updated label
    Corey Ostrove committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    c124419 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2023

  1. Refactor run_iterative_gst

    Refactor run_iterative_gst to use the new iterative_gst_generator generator function under the hood to avoid code duplication.
    Corey Ostrove committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    e827f76 View commit details
    Browse the repository at this point in the history
  2. Add new test for iterative_gst_generator

    Add a new test for warmstarting of iterative_gst_generator.
    Corey Ostrove committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    6ff3f62 View commit details
    Browse the repository at this point in the history