diff options
author | Patrick Simianer <p@simianer.de> | 2013-03-11 15:35:41 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2013-03-11 15:35:41 +0100 |
commit | afbd3ea06c16d1ffcee1fa76b489c91dc0264bf5 (patch) | |
tree | 5cf00edcccc86e11b7deaf8313423056407de71f | |
parent | 99fecad1a30fe33a581c9193ef1b18e16488dbc6 (diff) |
parallelize.rb: proper command line arguments
-rwxr-xr-x | training/dtrain/parallelize.rb | 9 |
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' |