72e4750366e3cfb1ebd9f18d4d54ad1f49380928,pymc3/sampling.py,,_mp_sample,#,538

Before Change


    start = kwargs.pop("start")

    rseed = _parallel_random_seed(random_seed, njobs)
    start_vals = _make_parallel(start, njobs)

    chains = list(range(chain, chain + njobs))
    pbars = [kwargs.pop("progressbar")] + [False] * (njobs - 1)
    traces = Parallel(n_jobs=njobs)(delayed(_sample)(chain=chains[i],
                                                     progressbar=pbars[i],
                                                     random_seed=rseed[i],
                                                     start=start_vals[i],
                                                     **kwargs) for i in range(njobs))
    return merge_traces(traces)

After Change


    chain = kwargs.pop("chain")
    rseed = kwargs.pop("random_seed")
    start = kwargs.pop("start")
    chains = kwargs.pop("chains")

    chain_nums = list(range(chain, chain + chains))
    pbars = [kwargs.pop("progressbar")] + [False] * (chains - 1)
    jobs = (delayed(_sample)(*args, **kwargs)
            for args in zip(chain_nums, pbars, rseed, start))
    traces = Parallel(n_jobs=njobs)(jobs)
    return MultiTrace(traces)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: pymc-devs/pymc3
Commit Name: 72e4750366e3cfb1ebd9f18d4d54ad1f49380928
Time: 2017-10-17
Author: aseyboldt@users.noreply.github.com
File Name: pymc3/sampling.py
Class Name:
Method Name: _mp_sample


Project Name: D2KLab/entity2rec
Commit Name: 1783757d1d5f62d2398d1f8df2cd71b4c3113b6f
Time: 2018-01-22
Author: enricopalumbo0@gmail.com
File Name: entity2rec/evaluator.py
Class Name: Evaluator
Method Name: features


Project Name: EpistasisLab/scikit-rebate
Commit Name: 971719830d589eba66434ddabfc62c1a689be677
Time: 2017-04-07
Author: weixuanf@upenn.edu
File Name: skrebate/relieff.py
Class Name: ReliefF
Method Name: _run_algorithm