File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
#
17
17
18
- import uuid
19
18
from abc import ABCMeta
20
19
21
- __all__ = ['Param' , 'Params' ]
22
-
23
-
24
- class Identifiable (object ):
25
- """
26
- Object with a unique ID.
27
- """
20
+ from pyspark .ml .util import Identifiable
28
21
29
- def __init__ (self ):
30
- #: A unique id for the object. The default implementation
31
- #: concatenates the class name, "-", and 8 random hex chars.
32
- self .uid = type (self ).__name__ + "-" + uuid .uuid4 ().hex [:8 ]
33
22
34
- def __repr__ (self ):
35
- return self .uid
23
+ __all__ = ['Param' , 'Params' ]
36
24
37
25
38
26
class Param (object ):
Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
#
17
17
18
+ import uuid
19
+
18
20
19
21
def inherit_doc (cls ):
20
22
for name , func in vars (cls ).items ():
@@ -28,3 +30,17 @@ def inherit_doc(cls):
28
30
func .__doc__ = parent_func .__doc__
29
31
break
30
32
return cls
33
+
34
+
35
+ class Identifiable (object ):
36
+ """
37
+ Object with a unique ID.
38
+ """
39
+
40
+ def __init__ (self ):
41
+ #: A unique id for the object. The default implementation
42
+ #: concatenates the class name, "-", and 8 random hex chars.
43
+ self .uid = type (self ).__name__ + "-" + uuid .uuid4 ().hex [:8 ]
44
+
45
+ def __repr__ (self ):
46
+ return self .uid
You can’t perform that action at this time.
0 commit comments