aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhaoyehua <zhaoyh6@asiainfo.com>2021-04-08 15:29:52 +0800
committerzhaoyehua <zhaoyh6@asiainfo.com>2021-04-08 15:30:03 +0800
commit019f917d2db615dc1e7ca2ec6d0d2d9aa3f515f3 (patch)
treee92772823c955a47bd8ed2ab9fbff378767ca73f
parentb3dfb7cb2bc93d2e95c4ffd53191b33f740c783b (diff)
feat:Fix startup issues
Issue-ID: USECASEUI-525 Change-Id: I8827232556b9b3ba0b96eae460d508efe03c6157 Signed-off-by: zhaoyehua <zhaoyh6@asiainfo.com>
-rw-r--r--nlp/scripts/api_squad_offline.py4
-rw-r--r--nlp/scripts/create_squad_features.py2
-rwxr-xr-xstandalone/src/main/assembly/run.sh2
3 files changed, 4 insertions, 4 deletions
diff --git a/nlp/scripts/api_squad_offline.py b/nlp/scripts/api_squad_offline.py
index 8a05141..8860dfe 100644
--- a/nlp/scripts/api_squad_offline.py
+++ b/nlp/scripts/api_squad_offline.py
@@ -34,10 +34,10 @@ from api_squad import model_fn_builder
from api_squad import FeatureWriter
from api_squad import convert_examples_to_features
from api_squad import input_fn_builder
+from api_squad import validate_flags_or_throw
+from api_squad import read_squad_examples
from global_setting import CUDA_VISIBLE_DEVICES
-from global_setting import validate_flags_or_throw
-from global_setting import read_squad_examples
from global_setting import FLAGS_bert_config_file, FLAGS_vocab_file, FLAGS_init_checkpoint_squad, questions
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
diff --git a/nlp/scripts/create_squad_features.py b/nlp/scripts/create_squad_features.py
index ce274e0..1db37fa 100644
--- a/nlp/scripts/create_squad_features.py
+++ b/nlp/scripts/create_squad_features.py
@@ -17,7 +17,7 @@ import six
import tensorflow as tf
import requests
-from global_setting import _improve_answer_span
+from api_squad import _improve_answer_span
version_2_with_negative = True
diff --git a/standalone/src/main/assembly/run.sh b/standalone/src/main/assembly/run.sh
index 72c5121..688852e 100755
--- a/standalone/src/main/assembly/run.sh
+++ b/standalone/src/main/assembly/run.sh
@@ -22,7 +22,7 @@ wget https://storage.googleapis.com/bert_models/2018_10_18/uncased_L-12_H-768_A-
unzip master.zip
unzip uncased_L-12_H-768_A-12.zip
rm master.zip uncased_L-12_H-768_A-12.zip
-mv scripts bert-master/
+cp scripts/* bert-master/
cd /home/run/bert-master/
nohup python -u api_squad_online.py 33011 > online.log 2>&1 &