# HG changeset patch # User Olivier Breuleux # Date 1232139227 18000 # Node ID e8cb4bde30a73bf5c44a69592e5373623cea9afa # Parent 7cee8c7f04498c1e1f78073d99b99c2fcfbd2466# Parent 8f40262297cf1a73551fd296eea40838025a5997 merge diff -r 8f40262297cf -r e8cb4bde30a7 pylearn/dbdict/newstuff.py --- a/pylearn/dbdict/newstuff.py Thu Jan 15 22:23:43 2009 -0500 +++ b/pylearn/dbdict/newstuff.py Fri Jan 16 15:53:47 2009 -0500 @@ -646,6 +646,8 @@ parser_sqlschedule = OptionParser(usage = '%prog sqlschedule [options] ') +parser_sqlschedule.add_option('-f', '--force', action = 'store_true', dest = 'force', default = False, + help = 'force adding the experiment to the database even if it is already there') def runner_sqlschedule(options, dbdescr, experiment, *strings): """ @@ -697,13 +699,15 @@ except: raise UsageError('The first parameter to sqlschedule must be a valid, importable symbol.') state['dbdict.experiment'] = experiment - sql.add_experiments_to_db([state], db, verbose = 1) + sql.add_experiments_to_db([state], db, verbose = 1, add_dups = options.force) runner_registry['sqlschedule'] = (parser_sqlschedule, runner_sqlschedule) parser_sqlschedule_filemerge = OptionParser(usage = '%prog sqlschedule_filemerge [options] ') +parser_sqlschedule_filemerge.add_option('-f', '--force', action = 'store_true', dest = 'force', default = False, + help = 'force adding the experiment to the database even if it is already there') def runner_sqlschedule_filemerge(options, dbdescr, experiment, mainfile, *other_files): """ @@ -741,7 +745,7 @@ except: raise UsageError('The first parameter to sqlschedule_filemerge must be a valid, importable symbol.') state['dbdict.experiment'] = experiment - sql.add_experiments_to_db([state], db, verbose = 1) + sql.add_experiments_to_db([state], db, verbose = 1, add_dups = options.force) runner_registry['sqlschedule_filemerge'] = (parser_sqlschedule_filemerge, runner_sqlschedule_filemerge)