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

List-mode objective function: minor refactor and extra functionality #1418

Merged
merged 15 commits into from
May 14, 2024

Commits on May 13, 2024

  1. List-mode objective function: always uses OpenMP for gradient

    - split caching in separate functions for reading a batch from
    list-mode file or cache
    - always use LM_distributable_computation for gradient
    
    Resulting code avoids duplication and is faster when caching is not used.
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    9273703 View commit details
    Browse the repository at this point in the history
  2. use more local variables in LM_distributable_computation

    The code pre-allocated bins for every thread, but local variables
    are allocated on the stack, which should take no time. Removing
    th epre-allocations simplifies the code, and prepares us for re-use
    for Hessian calculation etc
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    eca9c89 View commit details
    Browse the repository at this point in the history
  3. prepare LM_distributable function for Hessian

    - make list-mode loop into templated function
    - introduce separate functions for gradient and Hessian
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    81c5b64 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7c1fc00 View commit details
    Browse the repository at this point in the history
  5. LM_listmode_function: implement Hessian and move functions

    - move LM_distributable_function implementation to .txx as it now uses
     a template for the callback
    - implement actual_accumulate_Hessian... for LM
    - try to implement accumulation of log-likelihood
    
    WARNING: LM_distributable_computation is now generic and
    incompatible with the previous one (which was only for the gradient)
    
    Hessian function and log-likelihood value are currently untested/
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    cbf1999 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    233dead View commit details
    Browse the repository at this point in the history
  7. Add compute_gradient* (as opposed to only subset)

    Also expand test to use all subsets, make it slower of course.
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    c296721 View commit details
    Browse the repository at this point in the history
  8. Move common test to ObjectiveFunctionTests

    test_PoissonLogLikelihoodWithLinearModelForMeanAndProjData and test_priors
    contained nearly similar code, so moved it to a new class.
    
    This needed minor modifications to the tests, but also addition of
    GeneralisedObjectiveFunction::compute_value()
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    f9d5d25 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6437d85 View commit details
    Browse the repository at this point in the history
  10. fix sign of LM Hessian

    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    92448a3 View commit details
    Browse the repository at this point in the history
  11. LM obj-fun: add value() and tests

    - compute_objective_function() is now implemented as well
    - Tests are (almost) a duplicate of the ProjData version, but
      gradient-test is disabled as for this sample data it is too slow
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    7f6b2de View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    418c194 View commit details
    Browse the repository at this point in the history
  13. [GHA] upload ctest artefact if failure

    Also update to upload-artefacts@v4
    KrisThielemans committed May 13, 2024
    Configuration menu
    Copy the full SHA
    fe6bc39 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. add "increment" test for gradient (enabled for LM data)

    also minor clean-up
    KrisThielemans committed May 14, 2024
    Configuration menu
    Copy the full SHA
    267c161 View commit details
    Browse the repository at this point in the history
  2. [GHA] disabled LM objfunc test on MacOS

    Cannot figure out what the problem is, but the test works on Ubuntu and Windows
    KrisThielemans committed May 14, 2024
    Configuration menu
    Copy the full SHA
    490771b View commit details
    Browse the repository at this point in the history