pints icon indicating copy to clipboard operation
pints copied to clipboard

Refactor MCMCController.run() and OptimiserController.run()

Open ben18785 opened this issue 5 years ago • 2 comments

These functions are currently quite unwieldy -- long and hard to follow in places. As such, Better Code Hub identifies these are areas we should refactor.

It wouldn't take much -- just packaging away some of the code into shorter methods that .run() calls. But would think it would substantially improve readability.

ben18785 avatar Sep 05 '19 23:09 ben18785

Are you sure that would make them more readable? What they do is essentially a single procedure, so it didn't feel natural to break it up at the time. Agreed they are long methods now.

MichaelClerx avatar Sep 06 '19 00:09 MichaelClerx

Something that might work is if we can create objects that handle various sub tasks, e.g. an object for logging (see #426 ), object for handling stopping criteria in optimisations, etc. This way, users wanting to do their own ask-tell could also use these, which would make customisation way easier

MichaelClerx avatar Nov 10 '21 14:11 MichaelClerx