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

Add parameter sweep functionality #380

Merged
merged 33 commits into from
Jul 18, 2024
Merged

Add parameter sweep functionality #380

merged 33 commits into from
Jul 18, 2024

Commits on Jul 18, 2024

  1. Configuration menu
    Copy the full SHA
    dda51a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6374e12 View commit details
    Browse the repository at this point in the history
  3. Begin param sweep reader + writer implementations

    Implements the simple property getters.
    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    687eeb1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b21499e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e4e863c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d8e2c95 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6757f76 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ac2ba1d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    47e7038 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f5a6c43 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    314599d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b9bb048 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e8bd005 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d44e277 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f332637 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4610130 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4ffa9f5 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9d29c92 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4902721 View commit details
    Browse the repository at this point in the history
  20. Add block interfaces and base block class

    The motivation behind this change is that it would be useful to be able
    to use method wrapper objects (implementors of `MethodWrapper`) to
    execute methods in both:
    - the high throughput runner `TaskRunner`
    - the parameter sweep runner `ParamSweepRunner`
    
    The `DataSetBlock` class contains code that is mostly compatible with a
    parameter sweep run. However, one incompatibility is the
    `DataSetBlock.data.setter()` method, which places a constraint on the
    data involving the slicing dimension of the data. In parameter sweep
    runs there is only a single process being run, and so the concept of
    slicing dimension isn't relevant.
    
    Given that `DataSetBlock` contains a fair amount of logic that *is*
    usable in a parameter sweep run, after various iterations of testing out
    what could work well, the logic in `DataSetBlock` that is usable across
    both high throughput runs and parameter sweep runs has been extracted
    into a separate `BaseBlock` class.
    
    A high-level overview of the organisation of block-related functionality
    now is:
    - the various functionalites needed for a block type to be processable
      by implementors of `MethodWrapper` have been organised into three
      separate protocols: `BlockData`, `BlockTransfer`, and `BlockIndexing`
    - `BaseBlock` provides "typical implementations" for `BlockData` and
      `BlockTransfer`, which are reused by `DataSetBlock` via inheritance
    - thus, `BaseBlock` contains the code for "typical" implementations of
      methods that are common to blocks across both high throughput runs and
      parmeter sweep runs
    - `DataSetBlock` contains only the code specific to processing blocks in
      high throughput runs
    - in the future, the "typical implementations" contained in `BaseBlock`
      can be reused by a new block type that will be used in parameter sweep
      runs
    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    6fde29d View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4b2d722 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2c70854 View commit details
    Browse the repository at this point in the history
  23. Infer shape of array holding all sweep results from first block shape…

    … + no of sweep
    
    Before, the array to hold all sweep results was inferred from the
    `single_shape` value that was given when the writer object was first
    created. This had the implicit assumption that the shape of a single
    sweep result would be known at the time the writer object is created.
    
    This assumption holds when the method being executed in the sweep
    doesn't change the shape of the data during processing (most methods
    adhere to this). However, this assumption doesn't hold when the method
    executed in the sweep does change the shape of the data during
    processing (for example, reconstruction methods).
    
    Therefore, the writer now infers the shape of a single sweep result when
    the first block to be written has been given. This can then can be used
    to infer the shape of the array to hold all sweep results for both cases
    (when the method being executed in the sweep does and doesn't change the
    shape of the data).
    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    a408590 View commit details
    Browse the repository at this point in the history
  24. Use a single method wrapper for sweep execution

    Instead of creating multiple copies of the same wrapper with different
    values for the parameter to sweep over, use a single wrapper and update
    the parameters before each execution to reflect the new sweep value to
    be used.
    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    f9c6685 View commit details
    Browse the repository at this point in the history
  25. Create stages object in sweep runner constructor

    Instead of requiring that the caller of the sweep runner creates the
    `Stages` object, have the sweep runner generate that itself from the
    pipeline object.
    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    58f4a0e View commit details
    Browse the repository at this point in the history
  26. Add modified YAML loader to handle sweep YAML tags

    By default, the YAML loader used by the UI layer to load YAML pipeline
    files is now the modified version of `yaml.SafeLoader` that additionally
    handles the `!Sweep` and `!SweepRange` tags.
    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    976a9e0 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    d054276 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    91c186b View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    151b20d View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    092995d View commit details
    Browse the repository at this point in the history
  31. Update param sweep docs

    yousefmoazzam committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    361b2c4 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    dbec68d View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    12a6c8c View commit details
    Browse the repository at this point in the history