pints
pints copied to clipboard
Refactor MCMCController.run() and OptimiserController.run()
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.
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.
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