d491a8c498fa1555fbc581b9f3d27245404830ea,mystic/abstract_ensemble_solver.py,AbstractEnsembleSolver,__update_allSolvers,#AbstractEnsembleSolver#,353

Before Change


            em._x,em._y,em._id,em._info = _evalmon
            _solver._evalmon[le:] = em[le:]
            del em
            self._allSolvers[len(results)] = _solver //XXX: update not replace?
        return

    def __update_bestSolver(self):

After Change


        "replace allSolvers with solvers found in results"
        //NOTE: apparently, monitors internal to the solver don"t work as well
        // reconnect monitors; save all solvers
        fcalls = [getattr(s, "_fcalls", [0])[0] for s in self._allSolvers]
        from mystic.monitors import Monitor
        while results: //XXX: option to not save allSolvers? skip this and _copy
            _solver, _stepmon, _evalmon = results.pop()
            lr = len(results)
            sm, em = Monitor(), Monitor()
            s = self._allSolvers[lr]
            ls, le = len(s._stepmon), len(s._evalmon)
            // gather old and new results in monitors
            _solver._stepmon[:] = s._stepmon
            sm._x,sm._y,sm._id,sm._info = _stepmon
            _solver._stepmon[ls:] = sm[ls:]
            del sm
            _solver._evalmon[:] = s._evalmon
            em._x,em._y,em._id,em._info = _evalmon
            _solver._evalmon[le:] = em[le:]
            del em
            if not _solver._fcalls[0]: _solver._fcalls[0] = fcalls[lr]
            self._allSolvers[lr] = _solver //XXX: update not replace?
        return

    def __update_bestSolver(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: uqfoundation/mystic
Commit Name: d491a8c498fa1555fbc581b9f3d27245404830ea
Time: 2019-02-20
Author: mmckerns@968178ea-60bd-409e-af13-df8a517b6005
File Name: mystic/abstract_ensemble_solver.py
Class Name: AbstractEnsembleSolver
Method Name: __update_allSolvers


Project Name: explosion/thinc
Commit Name: 3d12c536e66ff4414860b8de1467fe56ede54063
Time: 2019-11-28
Author: adrianeboyd@gmail.com
File Name: thinc/neural/_classes/model.py
Class Name: Model
Method Name: define_operators


Project Name: explosion/spaCy
Commit Name: d5509e098911605cd0dc974827e18ff54f48812e
Time: 2019-10-28
Author: honnibal+gh@gmail.com
File Name: spacy/ml/tok2vec.py
Class Name:
Method Name: Tok2Vec


Project Name: jazzband/django-debug-toolbar
Commit Name: c4eeef24faa81e7bc64ebfbd72c046f25c7b3381
Time: 2012-01-12
Author: dcramer@gmail.com
File Name: debug_toolbar/panels/signals.py
Class Name: SignalDebugPanel
Method Name: process_response