[SPARK-8765] [MLLIB] [PYTHON] removed flaky python PIC test
See failure: [https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/36133/console] CC yanboliang mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes #7164 from jkbradley/pic-python-test and squashes the following commits: 156d55b [Joseph K. Bradley] removed flaky python PIC test
This commit is contained in:
parent
2012913355
commit
b8faa32875
|
@ -288,16 +288,12 @@ class PowerIterationClusteringModel(JavaModelWrapper, JavaSaveable, JavaLoader):
|
|||
>>> model = PowerIterationClustering.train(rdd, 2, 100)
|
||||
>>> model.k
|
||||
2
|
||||
>>> sorted(model.assignments().collect())
|
||||
[Assignment(id=0, cluster=1), Assignment(id=1, cluster=0), ...
|
||||
>>> import os, tempfile
|
||||
>>> path = tempfile.mkdtemp()
|
||||
>>> model.save(sc, path)
|
||||
>>> sameModel = PowerIterationClusteringModel.load(sc, path)
|
||||
>>> sameModel.k
|
||||
2
|
||||
>>> sorted(sameModel.assignments().collect())
|
||||
[Assignment(id=0, cluster=1), Assignment(id=1, cluster=0), ...
|
||||
>>> from shutil import rmtree
|
||||
>>> try:
|
||||
... rmtree(path)
|
||||
|
|
Loading…
Reference in a new issue