From acf559425aef523628ff20b44eddf4f5691435b1 Mon Sep 17 00:00:00 2001 From: Alex Black Date: Mon, 2 Sep 2019 16:44:57 +1000 Subject: [PATCH] Small test fix (#216) Signed-off-by: AlexDBlack --- .../org/deeplearning4j/spark/text/TextPipelineTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark-nlp/src/test/java/org/deeplearning4j/spark/text/TextPipelineTest.java b/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark-nlp/src/test/java/org/deeplearning4j/spark/text/TextPipelineTest.java index d12b9626c..2cae12e61 100644 --- a/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark-nlp/src/test/java/org/deeplearning4j/spark/text/TextPipelineTest.java +++ b/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark-nlp/src/test/java/org/deeplearning4j/spark/text/TextPipelineTest.java @@ -25,7 +25,6 @@ import org.deeplearning4j.models.word2vec.Huffman; import org.deeplearning4j.models.word2vec.VocabWord; import org.deeplearning4j.models.word2vec.wordstore.VocabCache; import org.deeplearning4j.spark.models.embeddings.word2vec.FirstIterationFunction; -import org.deeplearning4j.spark.models.embeddings.word2vec.FirstIterationFunctionAdapter; import org.deeplearning4j.spark.models.embeddings.word2vec.MapToPairFunction; import org.deeplearning4j.spark.models.embeddings.word2vec.Word2Vec; import org.deeplearning4j.spark.text.functions.CountCumSum; @@ -470,11 +469,11 @@ public class TextPipelineTest extends BaseSparkTest { Iterator, Long>> iterator = vocabWordListSentenceCumSumRDD.collect().iterator(); - FirstIterationFunctionAdapter firstIterationFunction = new FirstIterationFunctionAdapter( + FirstIterationFunction firstIterationFunction = new FirstIterationFunction( word2vecVarMapBroadcast, expTableBroadcast, pipeline.getBroadCastVocabCache()); - Iterable> ret = firstIterationFunction.call(iterator); - assertTrue(ret.iterator().hasNext()); + Iterator> ret = firstIterationFunction.call(iterator); + assertTrue(ret.hasNext()); } @Test