summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-02-10 07:07:12 +0000
committergebele <gebele@in-silico.ch>2017-02-10 07:07:12 +0000
commit61b98e011d4b32e88629d5a07d7b84a6abdded64 (patch)
tree470b646b551064728ff22757b8b8a3b1f4b74083
parentde8faad4822bba473a074d5d750e537904dfa2f7 (diff)
added update script
-rw-r--r--create_prediction_models.rb13
-rw-r--r--update_prediction_models.rb8
2 files changed, 12 insertions, 9 deletions
diff --git a/create_prediction_models.rb b/create_prediction_models.rb
index 9cecbb2..c653f01 100644
--- a/create_prediction_models.rb
+++ b/create_prediction_models.rb
@@ -5,7 +5,7 @@ include OpenTox
$mongo.database.drop
$gridfs = $mongo.database.fs # recreate GridFS indexes
-=begin
+#=begin
# classification models
Dir["classification/*csv"].each do |file|
unless file.match(/hamster/)
@@ -14,12 +14,12 @@ Dir["classification/*csv"].each do |file|
end
#=end
-=begin
+#=begin
# regression models
Dir["regression/*log10.csv"].each do |file|
Model::Validation.from_csv_file file
end
-=end
+#=end
## nano-lazar
=begin
@@ -63,10 +63,5 @@ end
=end
# save
-# local
-#`mongodump -h 127.0.0.1 -d production`
+`mongodump -h 127.0.0.1 -d production`
#`mongorestore --host 127.0.0.1`
-
-# to/from docker volume /dump
-#`sudo mongodump -h 127.0.0.1 -o /dump -d production`
-#`sudo mongorestore -h 127.0.0.1 /dump`
diff --git a/update_prediction_models.rb b/update_prediction_models.rb
new file mode 100644
index 0000000..496f7dc
--- /dev/null
+++ b/update_prediction_models.rb
@@ -0,0 +1,8 @@
+ENV["LAZAR_ENV"] = "production"
+require_relative '../lazar/lib/lazar'
+#require 'lazar'
+include OpenTox
+$mongo.database.drop
+$gridfs = $mongo.database.fs # recreate GridFS indexes
+
+`mongorestore --host 127.0.0.1`