coordinator.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:optomatic 作者: erlendd 项目源码 文件源码
def main():
    args = parse_cli()
    config = yread(args.conf)
    config['experiment_name'] = {}

    clfs, param_space, _ = get_param_space()
    for clf_name in clfs:

        print("processing {}".format(clf_name))
        # sampling max_evals parameters
        param_iter = ParameterSampler(param_space[clf_name], n_iter=config['max_evals'])

        # create the database collection's skeleton
        experiment_name = param_space_to_experiment_name(clf_name, user.param_space[clf_name])

        jobs = JobsDB(config['project_name'], experiment_name,
                      host=config['MongoDB']['host'],
                      port=config['MongoDB']['port'])

        jobs.create_jobs(config['features'], param_iter)

        # collect database collection's name
        config['experiment_name'][clf_name] = experiment_name

    # add collection's info to config.
    ywrite(config, args.save)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号