def test_train(datapath, jobid, wpc, lr_opt, batch_size, epochs, l1_value, problem_type, ): test1 = os.system( 'cd .. && python GenNet.py train {datapath} {jobid} -problem_type' ' {problem_type} -wpc {wpc} -lr {lr} -bs {bs} -epochs {epochs} -L1 {L1}'.format( datapath=datapath, jobid=jobid, problem_type=problem_type, wpc=wpc, lr=lr_opt, bs=batch_size, epochs=epochs, L1=l1_value)) assert test1 == 0 folder, resultpath = get_paths(jobid=jobid) test2 = os.path.exists(resultpath + '/bestweights_job.h5') assert test2
def plot(args): folder, resultpath = get_paths(args.ID) importance_csv = pd.read_csv(resultpath + "/connection_weights.csv", index_col=0) print(resultpath) layer = args.layer_n if args.type == "layer_weight": plot_layer_weight(resultpath, importance_csv, layer=layer, num_annotated=10) elif args.type == "sunburst": sunburst_plot(resultpath=resultpath, importance_csv=importance_csv) elif args.type == "raw_importance": manhattan_importance(resultpath=resultpath, importance_csv=importance_csv) else: print("invalid type:", args.type) exit()