add stacklevel for rabit
This commit is contained in:
parent
6b651176a3
commit
7572794add
@ -30,7 +30,7 @@ if hadoop_binary == None or hadoop_streaming_jar == None:
|
||||
warnings.warn('Warning: Cannot auto-detect path to hadoop and hadoop-streaming jar\n'\
|
||||
'\tneed to set them via arguments -hs and -hb\n'\
|
||||
'\tTo enable auto-detection, you can set enviroment variable HADOOP_HOME'\
|
||||
', or modify rabit_hadoop.py line 14')
|
||||
', or modify rabit_hadoop.py line 14', stacklevel = 2)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Rabit script to submit rabit jobs using Hadoop Streaming.'\
|
||||
'This script support both Hadoop 1.0 and Yarn(MRv2), Yarn is recommended')
|
||||
@ -122,7 +122,7 @@ def hadoop_streaming(nworker, worker_args, use_yarn):
|
||||
if args.nthread != -1:
|
||||
if kmap['nthread'] is None:
|
||||
warnings.warn('nthread can only be set in Yarn(Hadoop version greater than 2.0),'\
|
||||
'it is recommended to use Yarn to submit rabit jobs')
|
||||
'it is recommended to use Yarn to submit rabit jobs', stacklevel = 2)
|
||||
else:
|
||||
cmd += ' -D%s=%d' % (kmap['nthread'], args.nthread)
|
||||
cmd += ' -D%s=%d' % (kmap['timeout'], args.timeout)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user