From c809a287addd891074c158980d89d94fb817ee27 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Wed, 13 May 2015 20:15:26 +0200
Subject: small changes
---
lfpe.conf | 9 ++++++++-
run_server | 2 +-
server.rb | 14 +++++++-------
3 files changed, 16 insertions(+), 9 deletions(-)
mode change 120000 => 100644 lfpe.conf
diff --git a/lfpe.conf b/lfpe.conf
deleted file mode 120000
index 98fd0fb..0000000
--- a/lfpe.conf
+++ /dev/null
@@ -1 +0,0 @@
-/etc/apache2/conf.d/lfpe.conf
\ No newline at end of file
diff --git a/lfpe.conf b/lfpe.conf
new file mode 100644
index 0000000..622fe31
--- /dev/null
+++ b/lfpe.conf
@@ -0,0 +1,8 @@
+Alias /lfpe /fast_scratch/simianer/lfpe/lfpe/
+
+
+ Options +FollowSymLinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+
diff --git a/run_server b/run_server
index 39c92ae..97bae1a 100755
--- a/run_server
+++ b/run_server
@@ -2,5 +2,5 @@
export LD_LIBRARY_PATH=/fast_scratch/simianer/lfpe/nanomsg-0.5-beta/lib
export PYTHONPATH=~/.local/lib/python2.7/site-packages
-ruby server2.rb ../example/conf.rb #&>server2.rb.out
+ruby server.rb ../example/conf.rb &>server.rb.out
diff --git a/server.rb b/server.rb
index 922f103..2112638 100755
--- a/server.rb
+++ b/server.rb
@@ -7,7 +7,7 @@ require 'zipf'
require 'digest'
require_relative "#{ARGV[0]}"
-INPUT = ReadFile.readlines INPUT_FILE
+INPUT = ReadFile.readlines INPUT_FILE
`mkdir -p #{WORK_DIR}/g`
def start_daemon cmd, name, addr
@@ -18,7 +18,7 @@ def start_daemon cmd, name, addr
end
sock = NanoMsg::PairSocket.new
sock.connect addr
- STDERR.write ">> got #{sock.recv} from #{name}\n"
+ STDERR.write "< got #{sock.recv} from #{name}\n"
return sock, pid
end
@@ -27,16 +27,16 @@ def stop_all_daemons env
STDERR.write "shutting down all daemons\n"
env.each { |name,p|
p[:socket].send "shutdown"
- STDERR.write ">> #{name} is #{p[:socket].recv}"
+ STDERR.write "< #{name} is #{p[:socket].recv}\n"
}
end
daemons = {
:extractor => "python -m cdec.sa.extract -c #{DATA_DIR}/sa.ini --online -u -S '__ADDR__'",
- :aligner_fwd => "#{CDEC_NET}/word-aligner/net_fa -f #{DATA_DIR}/a/forward.params --sock_url '__ADDR__'",
- :aligner_back => "#{CDEC_NET}/word-aligner/net_fa -f #{DATA_DIR}/a/backward.params --sock_url '__ADDR__'",
+ :aligner_fwd => "#{CDEC_NET}/word-aligner/net_fa -f #{DATA_DIR}/a/forward.params -m #{FWD_MEAN_SRCLEN_MULT} -T #{FWD_TENSION} --sock_url '__ADDR__'",
+ :aligner_back => "#{CDEC_NET}/word-aligner/net_fa -f #{DATA_DIR}/a/backward.params -m #{BACK_MEAN_SRCLEN_MULT} -T #{BACK_TENSION} --sock_url '__ADDR__'",
:atools => "#{CDEC_NET}/utils/atools_net -c grow-diag-final-and -S '__ADDR__'",
- :dtrain => "#{CDEC_NET}/training/dtrain/dtrain_net_interface -c #{DATA_DIR}/dtrain.ini -o #{WORK_DIR}/weights.final -a '__ADDR__'"
+ :dtrain => "#{CDEC_NET}/training/dtrain/dtrain_net_interface -c #{DATA_DIR}/dtrain.ini -o #{WORK_DIR}/weights.final -a '__ADDR__'" ##{DTRAIN_EXTRA}"
}
env = {}
@@ -94,7 +94,7 @@ get '/next' do
STDERR.write "[atools] waiting for alignment ...\n"
a = env[:atools][:socket].recv.strip
STDERR.write "[atools] < got alignment '#{a}'\n"
- # actual extractor
+ # actual extractor
msg = "TEST ||| #{source} ||| #{reference} ||| #{a}"
STDERR.write "[extractor] > sending '#{msg}' for learning\n"
env[:extractor][:socket].send "TEST ||| #{source} ||| #{reference} ||| #{a}"
--
cgit v1.2.3