from os import system as act main_str = 'python preprocess_shihnew.py ' pth_in = '/beegfs/desy/user/hezhiyua/2bBacked/skimmed/Skim/fromBrian_forLola/h5/' pth_out = pth_in+'2d/' in_typ = {'test': 13266, 'val': 3981, 'train': 9588} for key, item in in_typ.iteritems(): arg_1 = pth_in+'vbf_qcd-'+key+'-v0_40cs.h5' arg_2 = pth_out+'vbf_qcd-'+key+'-v0_40cs.h5' arg_3 = str(item) arg_4 = key act(main_str + ' ' + arg_1 + ' ' + arg_2 + ' ' + arg_3 + ' ' + arg_4)
'J1cHadEFrac', 'J1nHadEFrac', 'J1nEmEFrac', 'J1cEmEFrac', 'J1cmuEFrac', 'J1muEFrac', 'J1eleEFrac', 'J1eleMulti', 'J1photonEFrac', 'J1photonMulti', 'J1cHadMulti', 'J1nHadMulti', 'J1npr', 'J1cMulti', 'J1nMulti', 'J1nSelectedTracks', 'J1ecalE' ] attr_2combi_list = combi_2ofN(attr_list) attr_flag_str = [' --attr1 ', ' --attr2 '] #fix_str = ' --train 1 --trnm 60 --trnl 5000 --tstm 60 --tstl 5000 --kin 0 --inputs find2b ' fix_str = ' --train 0 --trnm 60 --trnl 5000 --tstm 40 --tstl 500 --kin 0 --inputs find2b ' loop_list = attr_2combi_list[52:59] #[60:] #[152:]#[91:] for i in loop_list: out_string = main_str + fix_str for j in enumerate(attr_flag_str): out_string += j[1] + str(i[j[0]]) print out_string act(out_string) slp(wait_time) #""" """ # >>>>>>>>>>>>>>>>>>>>>>>>>>> 2D Parameter space: fix_str = ' --train 0 ' for m_skp in [40,50]: for l_skp in [1000,5000]: train_str = ' --trnm '+str(m_skp)+' --trnl '+str(l_skp)+' ' skip_point_str = ' --tstm '+str(m_skp)+' --tstl '+str(l_skp)+' ' for i in combi: out_string = main_str + fix_str + train_str for j in enumerate(flag_str): out_string += j[1]+str(i[j[0]]) if skip_point_str in out_string: continue
args = pars.parse_args() trnm = args.trnm tstm = args.tstm trnl = args.trnl tstl = args.tstl train = args.train kin = args.kin inputs = args.inputs attr1 = args.attr1 attr2 = args.attr2 path = '/home/hezhiyua/desktop/BDT_study/' #script_name = 'bdt_train.py' script_name = 'debug_bdt.py' main_str = 'python ' + path + script_name test = 0 if test == 0: fix_str = ' --train ' + str(train) train_str = ' --trnm ' + str(trnm) + ' --trnl ' + str(trnl) test_str = ' --tstm ' + str(tstm) + ' --tstl ' + str(tstl) combi_str = ' --kin ' + str(kin) + ' --inputs ' + str(inputs) attr_str = ' --attr1 ' + str(attr1) + ' --attr2 ' + str(attr2) act(main_str + fix_str + train_str + test_str + combi_str + attr_str) # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> single test: #elif test == 1: # fix_str = ' --train '+'0'#'1' # act(main_str+fix_str + ' --trnm 20 --tstm 60 --trnl 500 --tstl 5000 '+' --kin 0 '+' --inputs full ')
from os import system as act A = 'python ' B = '/home/hezhiyua/desktop/BDT_study/' C = 'debug_bdt.py' D = ' --train ' + '1' E = ' --kin ' + '0' F = ' --inputs '+ 'find2b' G = ' --trnm ' + '60' H = ' --trnl ' + '5000' I = ' --tstm ' + '60' J = ' --tstl ' + '5000' K = ' --attr1 ' + 'J1nSelectedTracks'#'J1npr'#'J1cMulti'#'J1nSelectedTracks' L = ' --attr2 ' + 'J1nSelectedTracks'#'J1cEmEFrac'#'J1cMulti'#'J1cHadEFrac'#'J1cMulti'#'J1cHadMulti'#'J1cHadEFrac'#'J1cHadMulti'#'J1photonMulti'#'J1cHadEFrac'#'J1muEFrac'#'J1nSelectedTracks' act(A+B+C+D+E+F+G+H+I+J+K+L)
#qcd_list = ['100to200','200to300','300to500','500to700','700to1000','1000to1500','1500to2000','2000toInf'] """ qcd_list = [200] qcd_list = [300] qcd_list = [500] qcd_list = [700] qcd_list = [1000] qcd_list = [1500] qcd_list = [2000] """ #qcd_list = [] #for i in range( len(sys.argv)-1 ): qcd_list.append(sys.argv[i+1]) pth = '/home/hezhiyua/desktop/CNN_Preprocessing/ROOT_convertion/old/skim_from_vect_new/' print 'Strating ...' #for qcd_i in qcd_list: for m_i in [20,30,40,50]: for ct_i in [500,1000,2000,5000]: act('python '+pth+'RootVect2h5_DPG.py '+' -s 1 '+' --ct '+str(ct_i)+' --mass '+str(m_i)) #m_i = sys.argv[1] #ct_i = sys.argv[2] #act('python '+pth+'RootVect2h5_DPG.py '+' --ct '+str(ct_i)+' --mass '+str(m_i)) print 'Done~'
#!/bin/python2.7 #SBATCH --partition=all #SBATCH --time=24:00:00 #SBATCH --nodes=1 #SBATCH --job-name skimming #SBATCH --output /home/hezhiyua/logs/skimming-%j.out #SBATCH --error /home/hezhiyua/logs/skimming-%j.err #SBATCH --mail-type END #SBATCH --mail-user [email protected] from os import system as act #qcd_list = ['100to200','200to300','300to500','500to700','700to1000','1000to1500','1500to2000','2000toInf'] qcd_list = [200] qcd_list = [300] qcd_list = [500] qcd_list = [700] qcd_list = [1000] qcd_list = [1500] qcd_list = [2000] print 'Strating ...' for qcd_i in qcd_list: act('python RootVect2h5_DPG.py ' + ' --ht ' + str(qcd_i)) print 'Done~'