Skip to content

Commit

Permalink
Reduce XShards tutorial test time (#5555)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkvision authored Aug 26, 2022
1 parent 94ddc35 commit e0e93b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/orca-tutorial-xshards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
pip install tensorflow==1.15.0
pip install sklearn
pip install pandas
pip install jep
pip install jep==3.9.0
pip install cloudpickle
- name: Run Test
#run: python -m build
Expand Down
9 changes: 3 additions & 6 deletions python/orca/dev/test/run-tutorial-xshards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ cd "`dirname $0`"
cd ../../tutorial/xshards

echo "#1 Running run-tabular_playground_series"

#timer
start=$(date "+%s")

Expand All @@ -44,7 +43,6 @@ now=$(date "+%s")
time1=$((now - start))

echo "#2 Running titanic"

#timer
start=$(date "+%s")

Expand All @@ -63,7 +61,6 @@ now=$(date "+%s")
time2=$((now - start))

echo "#3 Running diabetes"

#timer
start=$(date "+%s")

Expand All @@ -74,14 +71,14 @@ else
wget -nv $FTP_URI/analytics-zoo-data/xshards/pima-indians-diabetes-test.csv -P ${BIGDL_ROOT}/python/orca/tutorial/xshards/
fi

sed -i "s/epochs=150/epochs=2/g" diabetes.py
python diabetes.py

now=$(date "+%s")
time3=$((now - start))


echo "#4 Running ionosphere"

#timer
start=$(date "+%s")

Expand All @@ -92,14 +89,14 @@ else
wget -nv $FTP_URI/analytics-zoo-data/xshards/new_ionosphere.csv -P ${BIGDL_ROOT}/python/orca/tutorial/xshards/
fi

sed -i "s/epochs=100/epochs=2/g" ionosphere.py
python ionosphere.py

now=$(date "+%s")
time4=$((now - start))


echo "#5 Running auto_mpg"

#timer
start=$(date "+%s")

Expand All @@ -110,12 +107,12 @@ else
wget -nv $FTP_URI/analytics-zoo-data/xshards/auto-mpg.csv -P ${BIGDL_ROOT}/python/orca/tutorial/xshards/
fi

sed -i "s/EPOCHS = 1000/EPOCHS = 2/g" auto_mpg.py
python auto_mpg.py

now=$(date "+%s")
time5=$((now - start))


echo "#1 Running run-tabular_playground_series time used: $time1 seconds"
echo "#2 Running titanic time used: $time2 seconds"
echo "#3 Running diabetes time used: $time3 seconds"
Expand Down
2 changes: 1 addition & 1 deletion python/orca/tutorial/xshards/auto_mpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from bigdl.orca.data.transformer import *
from bigdl.orca.learn.tf.estimator import Estimator

import pandas as pd
import tensorflow.compat.v1 as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
Expand Down Expand Up @@ -81,3 +80,4 @@ def build_model():
est.fit(data=shards_train,
batch_size=16,
epochs=EPOCHS, feature_cols=['scaled_vec'], label_cols=['MPG'])
stop_orca_context()

0 comments on commit e0e93b9

Please sign in to comment.