def main(): args = configuration() base_name = args.name base_id = args.id for idx in range(1, 6): args.id = base_id + idx - 1 seed_val = random.randrange(10000000) seed_system(seed_val) args.seed = seed_val args.name = base_name + '_{}'.format(args.id) time = str(datetime.now()) scores = exec_unit(args) graph_path = create_graphs(sim_num=args.id, linear=True) message = '{0}\nSimulation Number {1} Completed\n' \ 'Min Error - {2:.3f}\n' \ 'Mean Error - {3:.3f}\n' \ 'Val Error - {4:.3f}'.format(time, args.id, scores[0], scores[1], scores[2]) send_notification(message, vars(args), graph_path, args)
def main(): # torch.distributed.init_process_group(backend='gloo', init_method='tcp://132.68.43.137:29500') args = configuration() base_name = args.name base_id = args.id seed_vals = [8678576, 4527389, 2113183, 518078, 7370063] for idx in range(1, 2): args.id = base_id + idx - 1 # seed_val = random.randrange(10000000) seed_val = seed_vals[idx - 1] seed_system(seed_val) args.seed = seed_val args.name = base_name + '_{}'.format(args.id) time = str(datetime.now()) scores = exec_unit(args) graph_path = create_graphs(sim_num=args.id, linear=True) message = '{0}\nSimulation Number {1} Completed\n' \ 'Min Error - {2:.3f}\n' \ 'Mean Error - {3:.3f}\n' \ 'Val Error - {4:.3f}'.format(time, args.id, scores[0], scores[1], scores[2]) send_notification(message, vars(args), graph_path, args)
def index(request): # create graphs and get list of file names file_paths = graphs.create_graphs() # create a template that shows each graph image # render the template return render(request, 'history/index.html', {'graphs': file_paths})
def opsys_gr(): x = ft.unique_specifications(notebooks, "OpSys") y = [ft.aver_prices(notebooks, "OpSys")[j] for j in x] gr.create_graphs(x, y, "OpSys")
def ram_gr(): x = ft.unique_specifications(notebooks, "Ram") y = [ft.aver_prices(notebooks, "Ram")[j] for j in x] gr.create_graphs(x, y, "Ram")
def typename_gr(): x = ft.unique_specifications(notebooks, "TypeName") y = [ft.aver_prices(notebooks, "TypeName")[j] for j in x] gr.create_graphs(x, y, "TypeName")
def comp_gr(): x = ft.unique_specifications(notebooks, "Company") y = [ft.aver_prices(notebooks, "Company")[j] for j in x] gr.create_graphs(x, y, "Company")