def add_build_env_defs(jobs_dict): mydict = OrderedDict() config_list = instantiate_configs() for c in config_list: for phase in dimensions.PHASES: # TODO why does this not have a test? if phase == "test" and c.cuda_version == "10": continue d = c.gen_yaml_tree(phase) mydict[c.gen_build_name(phase)] = d if phase == "test": for x in filter(lambda x: type(x) is not HiddenConf, c.get_dependents()): d = x.gen_yaml_tree(phase) mydict[x.gen_build_name(phase)] = d # this is the circleci api version and probably never changes jobs_dict["version"] = 2 jobs_dict["jobs"] = mydict graph = visualization.generate_graph(get_root()) graph.draw("pytorch-config-dimensions.png", prog="twopi")
def add_jobs_and_render(jobs_dict, toplevel_key, smoke, cron_schedule): jobs_list = [] configs = gen_build_env_list(smoke) for build_config in configs: build_name = build_config.gen_build_name("build") jobs_list.append(build_name) d = OrderedDict( triggers=gen_schedule_tree(cron_schedule), jobs=jobs_list, ) jobs_dict[toplevel_key] = d graph = visualization.generate_graph(get_root(smoke, toplevel_key)) graph.draw(toplevel_key + "-config-dimensions.png", prog="twopi")