summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[l---------]lfpe.conf9
-rwxr-xr-xrun_server2
-rwxr-xr-xserver.rb14
3 files changed, 16 insertions, 9 deletions
diff --git a/lfpe.conf b/lfpe.conf
index 98fd0fb..622fe31 120000..100644
--- a/lfpe.conf
+++ b/lfpe.conf
@@ -1 +1,8 @@
-/etc/apache2/conf.d/lfpe.conf \ No newline at end of file
+Alias /lfpe /fast_scratch/simianer/lfpe/lfpe/
+
+<Directory /fast_scratch/simianer/lfpe/lfpe>
+ Options +FollowSymLinks
+ AllowOverride All
+ order allow,deny
+ allow from all
+</Directory>
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}"