we can load tf models in spark orders. Now we need to be able to execute them

This commit is contained in:
Kevin Darby committed 2019-01-11 14:42:56 -05:00
1 parent be4c69fad4
commit 293c13e11d
4 files changed
+11 -8

No files matched your search

+2 -2
View File
@@ -58,8 +58,8 @@ else ()
COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/sdk/examples/order_plugin_example.so ${CMAKE_BINARY_DIR}/server/plugins/
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/sdk/examples/ai_order_plugin_example.so ${CMAKE_BINARY_DIR}/server/plugins/
COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins/lib
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libtensorflow.so ${CMAKE_BINARY_DIR}/server
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libtensorflow.so ${CMAKE_BINARY_DIR}/server/plugins
COMMENT "Creating server runtime layout"
DEPENDS sparkd data_files_dir)
+6 -3
View File
@@ -9,7 +9,6 @@ g++ -isystem ../externals/include \
-Wl,-rpath,../lib \
-L ../lib \
-l spark \
-l tensorflow \
-llttng-ust \
-ldl
@@ -38,10 +37,13 @@ g++ -isystem ../externals/include \
-o ai_order_plugin_example.so \
ai_order_plugin_example.cpp \
../tensorflow/tfapi.cpp \
-Wl,-rpath,. \
-Wl,-rpath,.. \
-Wl,-rpath,../lib/ \
-Wl,-rpath,./plugins \
-L ../lib \
-l spark \
-L ../externals/lib \
-l tensorflow
g++ -isystem ../externals/include \
@@ -53,12 +55,13 @@ g++ -isystem ../externals/include \
-o tf_test \
tf_test.cpp \
../tensorflow/tfapi.cpp \
-Wl,-rpath,.. \
-Wl,-rpath,. \
-Wl,-rpath,../lib \
-Wl,-rpath,../externals/lib \
-L ../lib \
-l spark \
-L ../externals/lib \
-l tensorflow \
-lpthread \
-llttng-ust \
-ldl
+2 -2
View File
@@ -21,10 +21,10 @@ int main()
}
cout << "loading saved model" << "\n";
TFStatus status2 = bts::ml::load_tf_model("~/rnn_saved_model", session);
TFStatus status2 = bts::ml::load_tf_model("/home/bts/rnn_saved_model/", session);
cout << "loaded saved model" << "\n";
if (!status2.ok()) {
cout << status2.code << "\n";
cout << status2.code << "\n" << status2.error;
return 1;
}
cout << "Session successfully created.\n";