6a289fefd72f038c8cc14826f63624950f5de1f8,gensim/models/lda_dispatcher.py,,main,#,176

Before Change


    if len(sys.argv) < 2:
        maxsize = MAX_JOBS_QUEUE
    else:
        maxsize = int(sys.argv[1])
    utils.pyro_daemon("gensim.lda_dispatcher", Dispatcher(maxsize=maxsize))

    logger.info("finished running %s" % program)

After Change




def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--maxsize", help="How many jobs (=chunks of N documents) "
                                           "to keep "pre-fetched" in a queue (default: %(default)s)",
                        type=int, default=MAX_JOBS_QUEUE)
    parser.add_argument("--host", help="Nameserver hostname (default: %(default)s)", default=None)
    parser.add_argument("--port", help="Nameserver port (default: %(default)s)", default=None, type=int)
    parser.add_argument("--no-broadcast", help="Disable broadcast (default: %(default)s)",
                        action="store_const", default=True, const=False)
    parser.add_argument("--hmac", help="Nameserver hmac key (default: %(default)s)", default=None)
    parser.add_argument("-v", "--verbose", help="Verbose flag", action="store_const", dest="loglevel",
                        const=logging.INFO, default=logging.WARNING)
    args = parser.parse_args()

    logging.basicConfig(format="%(asctime)s : %(levelname)s : %(message)s", level=args.loglevel)
    logger.info("running %s", " ".join(sys.argv))

    ns_conf = {"broadcast": args.no_broadcast,
               "host": args.host,
               "port": args.port,
               "hmac_key": args.hmac}
    utils.pyro_daemon(LDA_DISPATCHER_PREFIX, Dispatcher(maxsize=args.maxsize, ns_conf=ns_conf), ns_conf=ns_conf)

    logger.info("finished running %s", " ".join(sys.argv))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: 6a289fefd72f038c8cc14826f63624950f5de1f8
Time: 2016-07-13
Author: menshikh.iv@gmail.com
File Name: gensim/models/lda_dispatcher.py
Class Name:
Method Name: main


Project Name: PaddlePaddle/edl
Commit Name: 00c717a1276ceb5570f7c77a7b58a07c19bfc56d
Time: 2020-06-02
Author: wangxi16@baidu.com
File Name: python/paddle_edl/distill/redis/server_register.py
Class Name:
Method Name:


Project Name: flow-project/flow
Commit Name: de335dc4ef136c3a19a15610badcfd8db8a032fd
Time: 2017-05-05
Author: nishantkheterpal@gmail.com
File Name: cistar-dev/cistar/core/plotting.py
Class Name:
Method Name: