Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML-265][Examples][CI] Update DEVICE=CPU for examples #266

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/als-pyspark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source ../../conf/env.sh
# The data file should be copied to $HDFS_ROOT before running examples
DATA_FILE=$HDFS_ROOT/data/onedal_als_csr_ratings.txt

DEVICE=CPU
APP_PY=als-pyspark.py

time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
Expand All @@ -17,6 +18,7 @@ time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
--conf "spark.serializer=org.apache.spark.serializer.KryoSerializer" \
--conf "spark.default.parallelism=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.sql.shuffle.partitions=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.oap.mllib.device=$DEVICE" \
--conf "spark.driver.extraClassPath=$SPARK_DRIVER_CLASSPATH" \
--conf "spark.executor.extraClassPath=$SPARK_EXECUTOR_CLASSPATH" \
--conf "spark.shuffle.reduceLocality.enabled=false" \
Expand Down
2 changes: 2 additions & 0 deletions examples/als/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source ../../conf/env.sh
# The data file should be copied to $HDFS_ROOT before running examples
DATA_FILE=$HDFS_ROOT/data/onedal_als_csr_ratings.txt

DEVICE=CPU
APP_JAR=target/oap-mllib-examples-$OAP_MLLIB_VERSION.jar
APP_CLASS=org.apache.spark.examples.ml.ALSExample

Expand All @@ -18,6 +19,7 @@ time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
--conf "spark.serializer=org.apache.spark.serializer.KryoSerializer" \
--conf "spark.default.parallelism=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.sql.shuffle.partitions=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.oap.mllib.device=$DEVICE" \
--conf "spark.driver.extraClassPath=$SPARK_DRIVER_CLASSPATH" \
--conf "spark.executor.extraClassPath=$SPARK_EXECUTOR_CLASSPATH" \
--conf "spark.shuffle.reduceLocality.enabled=false" \
Expand Down
2 changes: 2 additions & 0 deletions examples/kmeans-pyspark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source ../../conf/env.sh
# The data file should be copied to $HDFS_ROOT before running examples
DATA_FILE=$HDFS_ROOT/data/sample_kmeans_data.txt

DEVICE=CPU
APP_PY=kmeans-pyspark.py

time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
Expand All @@ -17,6 +18,7 @@ time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
--conf "spark.serializer=org.apache.spark.serializer.KryoSerializer" \
--conf "spark.default.parallelism=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.sql.shuffle.partitions=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.oap.mllib.device=$DEVICE" \
--conf "spark.driver.extraClassPath=$SPARK_DRIVER_CLASSPATH" \
--conf "spark.executor.extraClassPath=$SPARK_EXECUTOR_CLASSPATH" \
--conf "spark.shuffle.reduceLocality.enabled=false" \
Expand Down
2 changes: 2 additions & 0 deletions examples/linear-regression/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source ../../conf/env.sh
# The data file should be copied to $HDFS_ROOT before running examples
DATA_FILE=$HDFS_ROOT/data/sample_linear_regression_data.txt

DEVICE=CPU
APP_JAR=target/oap-mllib-examples-$OAP_MLLIB_VERSION.jar
APP_CLASS=org.apache.spark.examples.ml.LinearRegressionExample

Expand All @@ -18,6 +19,7 @@ time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
--conf "spark.serializer=org.apache.spark.serializer.KryoSerializer" \
--conf "spark.default.parallelism=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.sql.shuffle.partitions=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.oap.mllib.device=$DEVICE" \
--conf "spark.driver.extraClassPath=$SPARK_DRIVER_CLASSPATH" \
--conf "spark.executor.extraClassPath=$SPARK_EXECUTOR_CLASSPATH" \
--conf "spark.shuffle.reduceLocality.enabled=false" \
Expand Down
2 changes: 2 additions & 0 deletions examples/naive-bayes/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source ../../conf/env.sh
# The data file should be copied to $HDFS_ROOT before running examples
DATA_FILE=$HDFS_ROOT/data/sample_libsvm_data.txt

DEVICE=CPU
APP_JAR=target/oap-mllib-examples-$OAP_MLLIB_VERSION.jar
APP_CLASS=org.apache.spark.examples.ml.NaiveBayesExample

Expand All @@ -18,6 +19,7 @@ time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
--conf "spark.serializer=org.apache.spark.serializer.KryoSerializer" \
--conf "spark.default.parallelism=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.sql.shuffle.partitions=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.oap.mllib.device=$DEVICE" \
--conf "spark.driver.extraClassPath=$SPARK_DRIVER_CLASSPATH" \
--conf "spark.executor.extraClassPath=$SPARK_EXECUTOR_CLASSPATH" \
--conf "spark.shuffle.reduceLocality.enabled=false" \
Expand Down
2 changes: 2 additions & 0 deletions examples/pca-pyspark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source ../../conf/env.sh
# The data file should be copied to $HDFS_ROOT before running examples
DATA_FILE=$HDFS_ROOT/data/pca_data.csv

DEVICE=CPU
APP_PY=pca-pyspark.py
K=3

Expand All @@ -18,6 +19,7 @@ time $SPARK_HOME/bin/spark-submit --master $SPARK_MASTER \
--conf "spark.serializer=org.apache.spark.serializer.KryoSerializer" \
--conf "spark.default.parallelism=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.sql.shuffle.partitions=$SPARK_DEFAULT_PARALLELISM" \
--conf "spark.oap.mllib.device=$DEVICE" \
--conf "spark.driver.extraClassPath=$SPARK_DRIVER_CLASSPATH" \
--conf "spark.executor.extraClassPath=$SPARK_EXECUTOR_CLASSPATH" \
--conf "spark.shuffle.reduceLocality.enabled=false" \
Expand Down