Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEva Hasler <ehasler@saxnot.inf.ed.ac.uk>2012-04-13 16:18:35 +0400
committerEva Hasler <ehasler@saxnot.inf.ed.ac.uk>2012-04-13 16:18:35 +0400
commitb85cf551c920239295219f7d1438cc0dea57f4a5 (patch)
treead4e05376b36f22d66fd0e33a6ff1f18825e7c0a /scripts
parentfc77c3e6234e4298c90c2a9ffa84fddf7582c343 (diff)
updates to ems
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ems/experiment.meta3
-rwxr-xr-xscripts/ems/experiment.perl11
-rwxr-xr-xscripts/ems/fix-info.perl33
3 files changed, 38 insertions, 9 deletions
diff --git a/scripts/ems/experiment.meta b/scripts/ems/experiment.meta
index 856537040..c99f2dd55 100644
--- a/scripts/ems/experiment.meta
+++ b/scripts/ems/experiment.meta
@@ -526,14 +526,13 @@ filter
default-name: tuning/moses.filtered.ini
rerun-on-change: filter-settings
pass-if: TRAINING:binarize-all
- ignore-if: use-hiero
filter-devtest
in: TRAINING:config input-devtest
out: filtered-config-devtest
default-name: tuning/moses.filtered.devtest.ini
rerun-on-change: filter-settings
pass-if: TRAINING:binarize-all
- ignore-if: use-hiero
+ ignore-unless: use-mira
tune
in: filtered-config input reference filtered-config-devtest input-devtest reference-devtest
out: weight-config
diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl
index f3a55074d..ffecae43e 100755
--- a/scripts/ems/experiment.perl
+++ b/scripts/ems/experiment.perl
@@ -5,7 +5,6 @@
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($Bin);
-$SIG{CHLD} = "IGNORE"; # no zombies
my $host = `hostname`; chop($host);
print STDERR "STARTING UP AS PROCESS $$ ON $host AT ".`date`;
@@ -125,9 +124,7 @@ sub init_agenda_graph() {
."showpage\n";
close(PS);
- $SIG{CHLD} = undef;
`convert -alpha off $graph_file.ps $graph_file.png`;
- $SIG{CHLD} = "IGNORE"; # no zombies
if (!$NO_GRAPH && !fork) {
# use ghostview by default, it it is installed
@@ -1571,9 +1568,9 @@ sub define_tuning_tune {
my $tuning_settings = &backoff_and_get("TUNING:tuning-settings");
$tuning_settings = "" unless $tuning_settings;
- my $use_mira = &check_and_get("TUNING:use-mira");
+ my $use_mira = &backoff_and_get("TUNING:use-mira");
my $cmd = "";
- if ($use_mira eq "true") {
+ if ($use_mira && $use_mira eq "true") {
my $experiment_dir = "$dir/tuning/tmp.$VERSION";
system("mkdir -p $experiment_dir");
@@ -1617,7 +1614,7 @@ sub write_mira_config {
my $moses_src_dir = &check_and_get("GENERAL:moses-src-dir");
my $tuning_decoder_settings = &check_and_get("TUNING:decoder-settings");
- my $core_weights = &check_and_get("TUNING:core-weight-config");
+ my $core_weights = &backoff_and_get("TUNING:core-weight-config");
my $input = &check_and_get("TUNING:input");
my $reference = &check_and_get("TUNING:reference");
my $tuning_settings = &check_and_get("TUNING:tuning-settings");
@@ -2345,7 +2342,7 @@ sub define_tuningevaluation_filter {
my $cmd = "$scripts/training/filter-model-given-input.pl";
$cmd .= " $filter_dir $config $input_filter $settings";
- my $use_mira = &check_and_get("TUNING:use-mira");
+ my $use_mira = &backoff_and_get("TUNING:use-mira");
if ($type && $type eq "dev" && $use_mira) {
# add line to config file to suppress caching
$cmd .= "\necho \"\" >> $filter_dir/moses.ini";
diff --git a/scripts/ems/fix-info.perl b/scripts/ems/fix-info.perl
new file mode 100755
index 000000000..924a1a990
--- /dev/null
+++ b/scripts/ems/fix-info.perl
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my ($file,$step) = @ARGV;
+$step = "*" unless defined($step);
+
+die("fix-info.perl file [step]") unless defined($file);
+die("file not found") unless -e $file;
+die("full path!") unless $file =~ /^\//;
+my @filestat = stat($file);
+my $newtime = $filestat[9];
+
+open(LS,"ls steps/$step/*INFO|") || die;
+while(my $info = <LS>) {
+ chop($info);
+ my @INFO = `cat $info`;
+ my $changed = 0;
+ foreach (@INFO) {
+ if (/$file .*\[/) {
+ $changed++;
+ s/($file) (.*\[)\d+/$1 $2$newtime/g;
+ }
+ }
+ if ($changed) {
+ print "updating $info\n";
+ open(INFO,">$info");
+ foreach (@INFO) { print INFO $_; }
+ close(INFO);
+ }
+}
+close(LS);
+