diff options
Diffstat (limited to 'python/pyspark/ml/util.py')
-rw-r--r-- | python/pyspark/ml/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/pyspark/ml/util.py b/python/pyspark/ml/util.py index 9dfcef0e40..841bfb47e1 100644 --- a/python/pyspark/ml/util.py +++ b/python/pyspark/ml/util.py @@ -21,6 +21,7 @@ from functools import wraps if sys.version > '3': basestring = str + unicode = str from pyspark import SparkContext, since from pyspark.mllib.common import inherit_doc @@ -67,10 +68,10 @@ class Identifiable(object): @classmethod def _randomUID(cls): """ - Generate a unique id for the object. The default implementation + Generate a unique unicode id for the object. The default implementation concatenates the class name, "_", and 12 random hex chars. """ - return cls.__name__ + "_" + uuid.uuid4().hex[12:] + return unicode(cls.__name__ + "_" + uuid.uuid4().hex[12:]) @inherit_doc |