mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-08 04:27:53 +03:00
startup ini file is backed up in order to preserve the pathnames to the original models, so that the final moses.ini file doesn't point to the filtered models
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1304 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
05a45bd0f9
commit
a83fe593c2
@ -134,7 +134,7 @@ my $SCORENBESTCMD = undef;
|
||||
my $qsubwrapper = undef;
|
||||
my $moses_parallel_cmd = undef;
|
||||
my $old_sge = 0; # assume sge<6.0
|
||||
|
||||
my $___CONFIG_BAK = undef; # backup pathname to startup ini file
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
@ -430,6 +430,8 @@ if ($___FILTER_PHRASE_TABLE){
|
||||
safesystem($cmd) or die "Failed to filter the tables.";
|
||||
}
|
||||
|
||||
# make a backup copy of startup ini file
|
||||
$___CONFIG_BAK = $___CONFIG;
|
||||
# the decoder should now use the filtered model
|
||||
$___CONFIG = "filtered/moses.ini";
|
||||
}
|
||||
@ -626,7 +628,7 @@ print "Training finished at ".`date`;
|
||||
safesystem("cp init.opt run$run.init.opt") or die;
|
||||
safesystem ("cp cmert.log run$run.cmert.log") or die;
|
||||
|
||||
create_config($___CONFIG, "./moses.ini", \%used_triples, $run, $devbleu);
|
||||
create_config($___CONFIG_BAK, "./moses.ini", \%used_triples, $run, $devbleu);
|
||||
|
||||
# just to be sure that we have the really last finished step marked
|
||||
open F, "> finished_step.txt" or die "Can't mark finished step";
|
||||
|
Loading…
Reference in New Issue
Block a user