From d1bf6b1645a45b555dba79cbcbaf88db819dc2d7 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Tue, 19 Aug 2014 21:54:47 +0100
Subject: dtrain: fix parallelize.rb
---
training/dtrain/parallelize.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/training/dtrain/parallelize.rb b/training/dtrain/parallelize.rb
index 82600009..5fc8b04e 100755
--- a/training/dtrain/parallelize.rb
+++ b/training/dtrain/parallelize.rb
@@ -4,7 +4,7 @@ require 'trollop'
def usage
STDERR.write "Usage: "
- STDERR.write "ruby parallelize.rb -c [-e ] [--randomize/-z] [--reshard/-y] -s <#shards|0> [-p ] -i -r [--qsub/-q] [--dtrain_binary ] [-l \"l2 select_k 100000\"] [--extra_qsub \"-l virtual_free=24G\"]\n"
+ STDERR.write "ruby parallelize.rb -c [-e ] [--randomize/-z] [--reshard/-y] -s <#shards|0> [-p ] -i -r [--qsub/-q] [--dtrain_binary ] [-l \"l2 select_k 100000\"] [--extra_qsub \"-l mem_free=24G\"]\n"
exit 1
end
@@ -87,6 +87,7 @@ def make_shards(input, refs, num_shards, epoch, rand)
refs_fns << refs_fn
0.upto(shard_sz-1) { |i|
j = index.pop
+ break if !j
shard_in.write in_lines[j]
shard_refs.write refs_lines[j]
}
--
cgit v1.2.3