This is an automated email from the ASF dual-hosted git repository.
meng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new aa0d4ca [SPARK-25970][ML] Add Instrumentation to PrefixSpan
aa0d4ca is described below
commit aa0d4ca8bab08a467645080a5b8a28bf6dd8a042
Author: zhengruifeng <[email protected]>
AuthorDate: Thu Dec 20 11:22:49 2018 -0800
[SPARK-25970][ML] Add Instrumentation to PrefixSpan
## What changes were proposed in this pull request?
Add Instrumentation to PrefixSpan
## How was this patch tested?
existing tests
Closes #22971 from zhengruifeng/log_PrefixSpan.
Authored-by: zhengruifeng <[email protected]>
Signed-off-by: Xiangrui Meng <[email protected]>
---
mllib/src/main/scala/org/apache/spark/ml/fpm/PrefixSpan.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/mllib/src/main/scala/org/apache/spark/ml/fpm/PrefixSpan.scala
b/mllib/src/main/scala/org/apache/spark/ml/fpm/PrefixSpan.scala
index 2a34135..b0006a8 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/fpm/PrefixSpan.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/fpm/PrefixSpan.scala
@@ -20,6 +20,7 @@ package org.apache.spark.ml.fpm
import org.apache.spark.annotation.{Experimental, Since}
import org.apache.spark.ml.param._
import org.apache.spark.ml.util.Identifiable
+import org.apache.spark.ml.util.Instrumentation.instrumented
import org.apache.spark.mllib.fpm.{PrefixSpan => mllibPrefixSpan}
import org.apache.spark.sql.{DataFrame, Dataset, Row}
import org.apache.spark.sql.functions.col
@@ -135,7 +136,10 @@ final class PrefixSpan(@Since("2.4.0") override val uid:
String) extends Params
* - `freq: Long`
*/
@Since("2.4.0")
- def findFrequentSequentialPatterns(dataset: Dataset[_]): DataFrame = {
+ def findFrequentSequentialPatterns(dataset: Dataset[_]): DataFrame =
instrumented { instr =>
+ instr.logDataset(dataset)
+ instr.logParams(this, params: _*)
+
val sequenceColParam = $(sequenceCol)
val inputType = dataset.schema(sequenceColParam).dataType
require(inputType.isInstanceOf[ArrayType] &&
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]