forked from intel-analytics/BigDL-2.x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add python examples auto test to jenkins (intel-analytics#1834)
* auto-test * fix openvino memory * fix openvino memory * keras2 * fix keras2 * fix * fix * fix k2 * fix k2 * temporary version * test for #6 * keras test * test nc * test nc * final * final fix * final fix * ffffinal fix * fix * f * f
- Loading branch information
Showing
4 changed files
with
272 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
export SPARK_HOME=$SPARK_HOME | ||
export MASTER=local[4] | ||
export FTP_URI=$FTP_URI | ||
export ANALYTICS_ZOO_ROOT=$ANALYTICS_ZOO_ROOT | ||
export ANALYTICS_ZOO_HOME=$ANALYTICS_ZOO_ROOT/dist | ||
|
||
set -e | ||
|
||
echo "#1 start example test for attention" | ||
#timer | ||
start=$(date "+%s") | ||
sed "s/max_features = 20000/max_features = 100/g;s/max_len = 200/max_len = 10/g;s/hidden_size=128/hidden_size=8/g" \ | ||
${ANALYTICS_ZOO_ROOT}/pyzoo/zoo/examples/attention/transformer.py \ | ||
> ${ANALYTICS_ZOO_ROOT}/pyzoo/zoo/examples/attention/tmp.py | ||
|
||
${ANALYTICS_ZOO_HOME}/bin/spark-submit-python-with-zoo.sh \ | ||
--conf spark.executor.extraJavaOptions="-Xss512m" \ | ||
--conf spark.driver.extraJavaOptions="-Xss512m" \ | ||
--master ${MASTER} \ | ||
--driver-memory 20g \ | ||
--executor-memory 100g \ | ||
${ANALYTICS_ZOO_ROOT}/pyzoo/zoo/examples/attention/tmp.py | ||
|
||
now=$(date "+%s") | ||
time1=$((now-start)) | ||
echo "#1 attention time used:$time1 seconds" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
clear_up () { | ||
echo "Clearing up environment. Uninstalling analytics-zoo" | ||
pip uninstall -y analytics-zoo | ||
pip uninstall -y bigdl | ||
pip uninstall -y pyspark | ||
} | ||
|
||
echo "#1 start example test for attention" | ||
start=$(date "+%s") | ||
sed "s/max_features = 20000/max_features = 200/g;s/max_len = 200/max_len = 20/g;s/hidden_size=128/hidden_size=8/g" \ | ||
${ANALYTICS_ZOO_ROOT}/pyzoo/zoo/examples/attention/transformer.py \ | ||
> ${ANALYTICS_ZOO_ROOT}/pyzoo/zoo/examples/attention/tmp.py | ||
export SPARK_DRIVER_MEMORY=20g | ||
python ${ANALYTICS_ZOO_ROOT}/pyzoo/zoo/examples/attention/tmp.py | ||
|
||
exit_status=$? | ||
if [ $exit_status -ne 0 ]; | ||
then | ||
clear_up | ||
echo "attention failed" | ||
exit $exit_status | ||
fi | ||
|
||
unset SPARK_DRIVER_MEMORY | ||
now=$(date "+%s") | ||
time1=$((now-start)) | ||
echo "attention time used:$time1 seconds" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters