Skip to content

Commit

Permalink
fix Identifiable._randomUID
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed May 12, 2015
1 parent 13bd70a commit 9630eae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/ml/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def __repr__(self):
return self.uid

@classmethod
def _randomUID(self):
def _randomUID(cls):
"""
Generate a unique id for the object. The default implementation
concatenates the class name, "_", and 12 random hex chars.
"""
return type(self).__name__ + "_" + uuid.uuid4().hex[12:]
return cls.__name__ + "_" + uuid.uuid4().hex[12:]

0 comments on commit 9630eae

Please sign in to comment.