summaryrefslogtreecommitdiff
path: root/training/dtrain
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-08-19 21:54:47 +0100
committerPatrick Simianer <p@simianer.de>2014-08-19 21:54:47 +0100
commitd1bf6b1645a45b555dba79cbcbaf88db819dc2d7 (patch)
treeca28cdb1f9f6248a787857a01aa67dbd1e8834d2 /training/dtrain
parent6a47226ee857483d6e06753e36d0b34933d8d300 (diff)
dtrain: fix parallelize.rb
Diffstat (limited to 'training/dtrain')
-rwxr-xr-xtraining/dtrain/parallelize.rb3
1 files changed, 2 insertions, 1 deletions
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 <dtrain.ini> [-e <epochs=10>] [--randomize/-z] [--reshard/-y] -s <#shards|0> [-p <at once=9999>] -i <input> -r <refs> [--qsub/-q] [--dtrain_binary <path to dtrain binary>] [-l \"l2 select_k 100000\"] [--extra_qsub \"-l virtual_free=24G\"]\n"
+ STDERR.write "ruby parallelize.rb -c <dtrain.ini> [-e <epochs=10>] [--randomize/-z] [--reshard/-y] -s <#shards|0> [-p <at once=9999>] -i <input> -r <refs> [--qsub/-q] [--dtrain_binary <path to 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]
}