comparison deep/stacked_dae/nist_sda.py @ 278:43afd29f3dbd

Ajouté fonctionnalité pour réinsérer de nouvelles jobs aux paramètres choisis manuellement, en liste, pour repartir des jobs spécifiques qui ont crashé
author fsavard
date Wed, 24 Mar 2010 14:35:11 -0400
parents b077d9e97a3b
children 206374eed2fb
comparison
equal deleted inserted replaced
268:b077d9e97a3b 278:43afd29f3dbd
22 22
23 from jobman import DD 23 from jobman import DD
24 import jobman, jobman.sql 24 import jobman, jobman.sql
25 from pylearn.io import filetensor 25 from pylearn.io import filetensor
26 26
27 from utils import produit_cartesien_jobs 27 from utils import produit_cartesien_jobs, jobs_from_reinsert_list
28 28
29 from sgd_optimization import SdaSgdOptimizer 29 from sgd_optimization import SdaSgdOptimizer
30 30
31 #from ift6266.utils.scalar_series import * 31 #from ift6266.utils.scalar_series import *
32 from ift6266.utils.seriestables import * 32 from ift6266.utils.seriestables import *
150 job.update({jobman.sql.EXPERIMENT: EXPERIMENT_PATH}) 150 job.update({jobman.sql.EXPERIMENT: EXPERIMENT_PATH})
151 jobman.sql.insert_dict(job, db) 151 jobman.sql.insert_dict(job, db)
152 152
153 print "inserted" 153 print "inserted"
154 154
155 def jobman_REinsert_nist():
156 jobs = jobs_from_reinsert_list(REINSERT_COLS, REINSERT_JOB_VALS)
157
158 db = jobman.sql.db(JOBDB)
159 for job in jobs:
160 job.update({jobman.sql.EXPERIMENT: EXPERIMENT_PATH})
161 jobman.sql.insert_dict(job, db)
162
163 print "reinserted"
164
165
166
155 if __name__ == '__main__': 167 if __name__ == '__main__':
156 168
157 args = sys.argv[1:] 169 args = sys.argv[1:]
158 170
159 #if len(args) > 0 and args[0] == 'load_nist': 171 #if len(args) > 0 and args[0] == 'load_nist':
160 # test_load_nist() 172 # test_load_nist()
161 173
162 if len(args) > 0 and args[0] == 'jobman_insert': 174 if len(args) > 0 and args[0] == 'jobman_insert':
163 jobman_insert_nist() 175 jobman_insert_nist()
164 176
177 if len(args) > 0 and args[0] == 'reinsert':
178 jobman_REinsert_nist()
179
165 elif len(args) > 0 and args[0] == 'test_jobman_entrypoint': 180 elif len(args) > 0 and args[0] == 'test_jobman_entrypoint':
166 chanmock = DD({'COMPLETE':0,'save':(lambda:None)}) 181 chanmock = DD({'COMPLETE':0,'save':(lambda:None)})
167 jobman_entrypoint(DEFAULT_HP_NIST, chanmock) 182 jobman_entrypoint(DEFAULT_HP_NIST, chanmock)
168 183
169 else: 184 else: