Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 68eb528

Browse files
committed
switch default seed to hash of type of self
1 parent 89c4611 commit 68eb528

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/pyspark/ml/param/_shared_params_code_gen.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ def get$Name(self):
103103
if __name__ == "__main__":
104104
print(header)
105105
print("\n# DO NOT MODIFY THIS FILE! It was generated by _shared_params_code_gen.py.\n")
106-
print("from pyspark.ml.param import Param, Params\n")
107-
print("import random\n")
108-
print("import sys\n\n")
106+
print("from pyspark.ml.param import Param, Params\n\n")
109107
shared = [
110108
("maxIter", "max number of iterations (>= 0)", None),
111109
("regParam", "regularization parameter (>= 0)", None),
@@ -121,7 +119,7 @@ def get$Name(self):
121119
("outputCol", "output column name", None),
122120
("numFeatures", "number of features", None),
123121
("checkpointInterval", "checkpoint interval (>= 1)", None),
124-
("seed", "random seed", "random.randint(0, sys.maxsize)"),
122+
("seed", "random seed", "hash(type(self).name)"),
125123
("tol", "the convergence tolerance for iterative algorithms", None),
126124
("stepSize", "Step size to be used for each iteration of optimization.", None)]
127125
code = []

0 commit comments

Comments
 (0)