diff options
author | bojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-15 19:16:28 +0400 |
---|---|---|
committer | bojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-15 19:16:28 +0400 |
commit | 53bbbbfa22af0feb83ef9a76fdee302e4b4f56ee (patch) | |
tree | bef5aaf208dae75740fdd2be8cd41abd3d77351d /scripts | |
parent | 568cff8e3452b098c056d13e61174019c64664df (diff) |
--continue now also attempts to step one extra step back if necessary moses output is not found
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@754 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/training/mert-moses.pl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/training/mert-moses.pl b/scripts/training/mert-moses.pl index 2bcdf9f63..d82e9d944 100755 --- a/scripts/training/mert-moses.pl +++ b/scripts/training/mert-moses.pl @@ -377,10 +377,15 @@ if ($continue) { chomp $step; $step++; close IN; - $start_run = $step +1; - die "Can't start from step $step, because run$step.best$___N_BEST_LIST_SIZE.out.gz was not found!" - if ! -e "run$step.best$___N_BEST_LIST_SIZE.out.gz"; + if (! -e "run$step.best$___N_BEST_LIST_SIZE.out.gz") { + # allow stepping one extra iteration back + $step--; + die "Can't start from step $step, because run$step.best$___N_BEST_LIST_SIZE.out.gz was not found!" + if ! -e "run$step.best$___N_BEST_LIST_SIZE.out.gz"; + } + + $start_run = $step +1; print STDERR "Reading last cached lambda values (result from step $step)\n"; @order_of_lambdas_from_decoder = get_order_of_scores_from_nbestlist("gunzip -c < run$step.best$___N_BEST_LIST_SIZE.out.gz |"); |