marcoabreu commented on a change in pull request #11294: [MXNET-543][WIP]Scala 
Spark test
URL: https://github.com/apache/incubator-mxnet/pull/11294#discussion_r195887039
 
 

 ##########
 File path: 
scala-package/spark/src/test/scala/org/apache/mxnet/spark/MXNetGeneralSuite.scala
 ##########
 @@ -42,30 +44,38 @@ class MXNetGeneralSuite extends SharedSparkContext {
   }
 
   private def downloadTestData(): Unit = {
+    logger.info("Downloading the training data...")
     Process("wget 
http://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon"; +
       "/dataset/mxnet-spark-test/train.txt" + " -P " + testDataDir + " -q") !
   }
 
-//  override def beforeAll(): Unit = {
-//  val tempDirFile = 
Files.createTempDirectory(s"mxnet-spark-test-${System.currentTimeMillis()}").
-//      toFile
-//    testDataDir = tempDirFile.getPath
-//    tempDirFile.deleteOnExit()
-//    downloadTestData()
-//  }
+  override def beforeAll(): Unit = {
+  val tempDirFile = 
Files.createTempDirectory(s"mxnet-spark-test-${System.currentTimeMillis()}").
+      toFile
+    testDataDir = tempDirFile.getPath
+    tempDirFile.deleteOnExit()
+    downloadTestData()
+  }
 
-  test("Dummy test on Spark") {
+  test("run spark with MLP") {
+    if (System.getenv().containsKey("SCALA_TEST_ON_GPU") &&
+      System.getenv("SCALA_TEST_ON_GPU").toInt == 1) {
+      val trainData = parseRawData(sc, s"$testDataDir/train.txt")
+      val model = buildMlp().fit(trainData)
+      assert(model != null)
+    } else {
+      logger.info("Currently not supporting CPU, skipped for now")
+    }
+  }
 
+  test("run spark with LeNet") {
+    if (System.getenv().containsKey("SCALA_TEST_ON_GPU") &&
 
 Review comment:
   Just to clarify, in future we will run all tests (CPU and GPU) in parallel. 
At the moment it's only CPU ones which are already in parallel. Tests should 
not require exclusive access to any resource.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to