Commit 5cf0c1d5 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Change default behaviour to run in single process

parent eeeb5306
......@@ -151,7 +151,7 @@ CLI_ARGUMENTS = collections.OrderedDict((
(('wd', 'work_dir'), {}),
(('lf', 'log_file'), {}),
(('nj', 'num_jobs'), {'type' : int,
'default' : mp.cpu_count()}),
'default' : 1}),
(('pt', 'pass_through'), {'action' : 'store_true'}),
(('p', 'plugin_file'), {'action' : 'append',
'metavar' : 'FILE'}),
......@@ -389,9 +389,9 @@ CLI_ARGUMENT_HELP = {
'work_dir' : 'Deprecated, has no effect.',
'log_file' : 'Save log messages to file.',
'num_jobs' : 'Maximum number of jobs to run in parallel. Set to 1 '
'to disable parallelisation. '
'(default: number of available CPUs [{} on '
'this platform]).'.format(mp.cpu_count()),
'(the default) to disable parallelisation. Set to -1 '
'to use all available cores ({} on this '
'platform).'.format(mp.cpu_count()),
'pass_through' : 'Do not perform any cleaning or processing on the data - '
'implies --skip_insertna, --skip_childvalues, '
'--skip_clean_funcs, --skip_recoding, and '
......@@ -583,6 +583,11 @@ def parseArgs(argv=None, namespace=None):
args.skip_recoding = True
args.skip_processing = True
# -1 implies max-parallel
if args.num_jobs == -1:
args.nun_jobs = mp.cpu_count()
# the importing.loadData function accepts
# either a single encoding, or one encoding
# for each data file.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment