:py:mod:`pemtk.fit._parallel` ============================= .. py:module:: pemtk.fit._parallel .. autoapi-nested-parse:: PEMtk wrappers for parallel processing for fitting Currently wraps xyzpy's `run_combos` for parallel functionality and data handling. See `the xyzpy docs `_ for details. Other methods to be implemented. 13/09/21 v1 Basic wrapper with XYZPY implemented Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pemtk.fit._parallel.multiFit pemtk.fit._parallel.fitPara .. py:function:: multiFit(self, nRange=[0, 10], parallel=True, num_workers=None, randomizeParams=True, seedParams=None) Basic wrapper for pemtk.fitClass.fit() for multiprocess execution. Run a batch of fits in parallel, and return results to main class structure. Currently wraps xyzpy's `run_combos` for parallel functionality and data handling. See `the xyzpy docs `_ for details. Note: full set of results currently returned as an Xarray DataSet, then sorted back to base class as self.data[n] (integer n). In future may just want to use Xarray return directly? :param nRange: Fit indexers. Set [nStart, nStop], full run will be set as list(range(nRange[0],nRange[1])). TODO: more flexibility here, and auto. :type nRange: list :param parallel: Run fit jobs in parallel? Note - in testing this seemed to be ignored? :type parallel: bool, default = True :param num_workers: Number of cores to use if parallel job. Currently set to default to ~90% of mp.cpu_count() :type num_workers: int, default = None :param randomizeParams: Randomize seed parameters per fit? :type randomizeParams: bool, default = True :param seedParams: NOT IMPLEMENTED, but will provide an option to seed fits from a previous result. :type seedParams: int, default = None .. py:function:: fitPara(data=None, n=None, randomizeParams=True, seedParams=None) Wrap self.fit() for XYZPY runner.