summaryrefslogtreecommitdiff
path: root/training
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
commit5125f56e6f0f5ee5427f2687eb5f962589ae4c5e (patch)
tree1e234e79e2bab7081e073f8a7efd4109dec1783c /training
parentbf9ee90b00ebc1fc4f3ce16cb33bdbd1032675c9 (diff)
parallelize.rb: proper command line arguments
Diffstat (limited to 'training')
-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'