summaryrefslogtreecommitdiff
path: root/training/dtrain
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-03-11 15:35:41 +0100
committerPatrick Simianer <p@simianer.de>2013-03-11 15:35:41 +0100
commitafbd3ea06c16d1ffcee1fa76b489c91dc0264bf5 (patch)
tree5cf00edcccc86e11b7deaf8313423056407de71f /training/dtrain
parent99fecad1a30fe33a581c9193ef1b18e16488dbc6 (diff)
parallelize.rb: proper command line arguments
Diffstat (limited to 'training/dtrain')
-rwxr-xr-xtraining/dtrain/parallelize.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/training/dtrain/parallelize.rb b/training/dtrain/parallelize.rb
index 50c966d7..acfd7290 100755
--- a/training/dtrain/parallelize.rb
+++ b/training/dtrain/parallelize.rb
@@ -5,7 +5,7 @@ require 'trollop'
def usage
if ARGV.size != 8
STDERR.write "Usage: "
- STDERR.write "ruby parallelize.rb -c <dtrain.ini> -e <epochs> [--randomize/-z] -s <#shards|0> -p <at once> -i <input> -r <refs> [--qsub/-q]\n"
+ STDERR.write "ruby parallelize.rb -c <dtrain.ini> -e <epochs> [--randomize/-z] -s <#shards|0> -p <at once> -i <input> -r <refs> [--qsub/-q] --dtrain_binary <path to dtrain binary>\n"
exit 1
end
end
@@ -20,13 +20,18 @@ opts = Trollop::options do
opt :input, "input", :type => :string
opt :references, "references", :type => :string
opt :qsub, "use qsub", :type => :bool, :default => false
+ opt :dtrain_binary, "path to dtrain binary", :type => :string
end
puts opts.to_s
dtrain_dir = File.expand_path File.dirname(__FILE__)
-dtrain_bin = "#{dtrain_dir}/dtrain"
+if not opts[:dtrain_binary]
+ dtrain_bin = "#{dtrain_dir}/dtrain"
+else
+ dtrain_bin = opts[:dtrain_binary]
+end
ruby = '/usr/bin/ruby'
lplp_rb = "#{dtrain_dir}/hstreaming/lplp.rb"
lplp_args = 'l2 select_k 100000'