-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-50899][ML][PYTHON][CONNECT] Support PrefixSpan on connect #49763
Conversation
@@ -167,3 +170,27 @@ final class PrefixSpan(@Since("2.4.0") override val uid: String) extends Params | |||
override def copy(extra: ParamMap): PrefixSpan = defaultCopy(extra) | |||
|
|||
} | |||
|
|||
private[spark] class PrefixSpanWrapper(override val uid: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PrefixSpan
is not a transformer or estimator, add such wrapper so that it can be treated as a transformer on spark connect
|
||
head = output.sort("sequence").head() | ||
self.assertEqual(head.sequence, [[1]]) | ||
self.assertEqual(head.freq, 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PrefixSpan doesn't support save/load
### What changes were proposed in this pull request? Support PrefixSpan on connect ### Why are the changes needed? feature parity ### Does this PR introduce _any_ user-facing change? yes ### How was this patch tested? added tests ### Was this patch authored or co-authored using generative AI tooling? no Closes #49763 from zhengruifeng/ml_connect_prefix_span. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]> (cherry picked from commit f840abb) Signed-off-by: Ruifeng Zheng <[email protected]>
merged to master/4.0 |
What changes were proposed in this pull request?
Support PrefixSpan on connect
Why are the changes needed?
feature parity
Does this PR introduce any user-facing change?
yes
How was this patch tested?
added tests
Was this patch authored or co-authored using generative AI tooling?
no