diff --git a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OAlgorithmMOJOModelBase.py b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OAlgorithmMOJOModelBase.py index e36d1caf5a..dfc429d26c 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OAlgorithmMOJOModelBase.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OAlgorithmMOJOModelBase.py @@ -15,11 +15,8 @@ # limitations under the License. # -from pyspark.ml.param import * from ai.h2o.sparkling.ml.models.H2OMOJOModelBase import H2OMOJOModelBase -import warnings - class H2OAlgorithmMOJOModelBase(H2OMOJOModelBase): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OBinaryModel.py b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OBinaryModel.py index 9546e3ef67..ebfc8e0863 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OBinaryModel.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OBinaryModel.py @@ -16,7 +16,6 @@ # from ai.h2o.sparkling.Initializer import Initializer -from pyspark.ml.param import * from pyspark.ml.util import _jvm diff --git a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOModelBase.py b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOModelBase.py index fdadacd7b6..1889a0b553 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOModelBase.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOModelBase.py @@ -15,7 +15,6 @@ # limitations under the License. # -from pyspark.ml.param import * from pyspark.ml.util import JavaMLWritable from pyspark.ml.wrapper import JavaModel from ai.h2o.sparkling.ml.util.H2OJavaMLReadable import H2OJavaMLReadable diff --git a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOPipelineModel.py b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOPipelineModel.py index d532e0d154..1efdde98fa 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOPipelineModel.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOPipelineModel.py @@ -18,7 +18,6 @@ from ai.h2o.sparkling.Initializer import Initializer from ai.h2o.sparkling.ml.models import H2OMOJOSettings from ai.h2o.sparkling.ml.models.H2OAlgorithmMOJOModelBase import H2OAlgorithmMOJOModelBase -from pyspark.ml.param import * from pyspark.ml.util import _jvm from pyspark.sql.column import Column diff --git a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOSettings.py b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOSettings.py index 9cdbdaa0f7..ff91043a2c 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOSettings.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/models/H2OMOJOSettings.py @@ -15,7 +15,6 @@ # limitations under the License. # -from pyspark.ml.param import * from pyspark.ml.wrapper import JavaWrapper diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmCommonParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmCommonParams.py index 83eeee4d74..e5e4bd3704 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmCommonParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmCommonParams.py @@ -17,8 +17,6 @@ from ai.h2o.sparkling.ml.params.H2OCommonParams import H2OCommonParams from ai.h2o.sparkling.ml.params.H2OAlgorithmMOJOParams import H2OAlgorithmMOJOParams -from pyspark.ml.param import * -import warnings class H2OAlgorithmCommonParams(H2OCommonParams, H2OAlgorithmMOJOParams): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmMOJOParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmMOJOParams.py index b7a8752288..876db20d75 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmMOJOParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAlgorithmMOJOParams.py @@ -17,8 +17,7 @@ from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters from ai.h2o.sparkling.ml.params.H2OBaseMOJOParams import H2OBaseMOJOParams -from pyspark.ml.param import * -import warnings +from pyspark.ml.param import Param, Params class H2OAlgorithmMOJOParams(H2OBaseMOJOParams): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParams.py index 61f78ca86d..fe8bac4c03 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParams.py @@ -15,7 +15,7 @@ # limitations under the License. # -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters from ai.h2o.sparkling.ml.params.HasInputCols import HasInputCols from ai.h2o.sparkling.ml.params.HasOutputCol import HasOutputCol diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParamsOnMOJO.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParamsOnMOJO.py index f0d379b313..53ccc9e891 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParamsOnMOJO.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoEncoderExtraParamsOnMOJO.py @@ -15,7 +15,6 @@ # limitations under the License. # -from pyspark.ml.param import * from ai.h2o.sparkling.ml.params.HasInputColsOnMOJO import HasInputColsOnMOJO from ai.h2o.sparkling.ml.params.HasOutputColOnMOJO import HasOutputColOnMOJO diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoMLParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoMLParams.py index 254ed34916..c954b6f227 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoMLParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OAutoMLParams.py @@ -21,7 +21,6 @@ from ai.h2o.sparkling.ml.params.H2OAutoMLStoppingCriteriaParams import H2OAutoMLStoppingCriteriaParams from ai.h2o.sparkling.ml.params.H2OCommonParams import H2OCommonParams from ai.h2o.sparkling.ml.params.HasMonotoneConstraints import HasMonotoneConstraints -from pyspark.ml.param import * class H2OAutoMLParams( diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OBaseMOJOParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OBaseMOJOParams.py index 11fd9ddf9b..d1d31129b6 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OBaseMOJOParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OBaseMOJOParams.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class H2OBaseMOJOParams(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OCommonParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OCommonParams.py index 562ce0dc2c..172cba1a52 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OCommonParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OCommonParams.py @@ -18,7 +18,7 @@ from ai.h2o.sparkling.ml.params.H2OBaseMOJOParams import H2OBaseMOJOParams from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters from h2o.utils.typechecks import assert_is_type -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class H2OCommonParams(H2OBaseMOJOParams): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParams.py index f910d2be45..cc8bc92086 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParams.py @@ -15,7 +15,7 @@ # limitations under the License. # -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters from ai.h2o.sparkling.ml.params.H2ODimReductionExtraParams import H2ODimReductionExtraParams diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParamsOnMOJO.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParamsOnMOJO.py index cd7d578a05..b1d7cc15a1 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParamsOnMOJO.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGLRMExtraParamsOnMOJO.py @@ -15,7 +15,6 @@ # limitations under the License. # -from pyspark.ml.param import * from ai.h2o.sparkling.ml.params.H2ODimReductionExtraParamsOnMOJO import H2ODimReductionExtraParamsOnMOJO diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGridSearchParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGridSearchParams.py index ce88e78557..1ac3879028 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGridSearchParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OGridSearchParams.py @@ -20,7 +20,7 @@ from ai.h2o.sparkling.ml.params.H2OGridSearchRandomDiscreteCriteriaParams import \ H2OGridSearchRandomDiscreteCriteriaParams from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class H2OGridSearchParams( diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OMOJOModelParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OMOJOModelParams.py index 3da2be43f4..d0f37bf3b1 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OMOJOModelParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OMOJOModelParams.py @@ -20,7 +20,6 @@ from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters from ai.h2o.sparkling.H2ODataFrameConverters import H2ODataFrameConverters from ai.h2o.sparkling.ml.metrics.H2OMetricsFactory import H2OMetricsFactory -from pyspark.ml.param import * class H2OMOJOModelParams: diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderMOJOParams.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderMOJOParams.py index 32601fe55b..bbce478094 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderMOJOParams.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTargetEncoderMOJOParams.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class H2OTargetEncoderMOJOParams(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTypeConverters.py b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTypeConverters.py index 10fe98c58d..2c7edeba9d 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTypeConverters.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/H2OTypeConverters.py @@ -20,7 +20,7 @@ from pyspark.ml.linalg import DenseVector, DenseMatrix from pyspark.ml.param import TypeConverters from pyspark.ml.util import _jvm -from pyspark.sql import DataFrame, SparkSession +from pyspark.sql import DataFrame class H2OTypeConverters(object): @@ -228,7 +228,7 @@ def convert(value): if TypeConverters._can_convert_to_list(valueForConversion): valueForConversion = TypeConverters.toList(valueForConversion) - if all(map(lambda v: type(v) == bool, valueForConversion)): + if all(map(lambda v: isinstance(v, bool), valueForConversion)): return [bool(v) for v in valueForConversion] raise TypeError("Could not convert %s to list of booleans" % valueForConversion) diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasBaseAlgorithms.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasBaseAlgorithms.py index ee24ffadc8..541c169649 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasBaseAlgorithms.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasBaseAlgorithms.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasBaseAlgorithms(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasBetaConstraints.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasBetaConstraints.py index 78e0a4eeb2..5c3ddc32cc 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasBetaConstraints.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasBetaConstraints.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasBetaConstraints(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasBlendingDataFrame.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasBlendingDataFrame.py index 520d15244e..00265da55b 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasBlendingDataFrame.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasBlendingDataFrame.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasBlendingDataFrame(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasCalibrationDataFrame.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasCalibrationDataFrame.py index 1086153334..85066851fa 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasCalibrationDataFrame.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasCalibrationDataFrame.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasCalibrationDataFrame(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasGamCols.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasGamCols.py index bc80ab818a..338fe53e1b 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasGamCols.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasGamCols.py @@ -15,8 +15,7 @@ # limitations under the License. # -from pyspark.ml.param import * - +from pyspark.ml.param import Param, Params from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasIgnoredCols.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasIgnoredCols.py index e7941f5161..8c59f140d1 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasIgnoredCols.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasIgnoredCols.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasIgnoredCols(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialBiases.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialBiases.py index f788b08fae..62578c494f 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialBiases.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialBiases.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasInitialBiases(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialWeights.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialWeights.py index 113c541bc1..4a975d6e74 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialWeights.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInitialWeights.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasInitialWeights(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCol.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCol.py index 81c77d2527..e0aa05b2cd 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCol.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCol.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasInputCol(Params): inputCol = Param( diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCols.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCols.py index ea443622b8..f61d52a051 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCols.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInputCols.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasInputCols(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInteractionPairs.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInteractionPairs.py index 3dfb6e2182..ada43a5d04 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasInteractionPairs.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasInteractionPairs.py @@ -15,9 +15,8 @@ # limitations under the License. # -from pyspark.ml.param import * import warnings - +from pyspark.ml.param import Param, Params from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasLeaderboardDataFrame.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasLeaderboardDataFrame.py index f61fd0939f..85c1281771 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasLeaderboardDataFrame.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasLeaderboardDataFrame.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasLeaderboardDataFrame(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasLinearConstraints.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasLinearConstraints.py index 475c47f3e8..8643515377 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasLinearConstraints.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasLinearConstraints.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasLinearConstraints(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasLossByColNames.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasLossByColNames.py index 80298b714d..0f55443596 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasLossByColNames.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasLossByColNames.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasLossByColNames(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasMonotoneConstraints.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasMonotoneConstraints.py index a9cae571f3..642cd20144 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasMonotoneConstraints.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasMonotoneConstraints.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasMonotoneConstraints(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasOutputCol.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasOutputCol.py index bafeba6a3b..4ba4066d88 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasOutputCol.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasOutputCol.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasOutputCol(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasPlugValues.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasPlugValues.py index 3a67934915..1796377acd 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasPlugValues.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasPlugValues.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasPlugValues(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasRandomCols.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasRandomCols.py index c3fcfff675..80a9165bf4 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasRandomCols.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasRandomCols.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasRandomCols(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserPoints.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserPoints.py index 934834275c..97263ae1c4 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserPoints.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserPoints.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasUserPoints(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserX.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserX.py index 24026b4e90..44124e1337 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserX.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserX.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasUserX(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserY.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserY.py index 3498cfc640..fb4fdeef7a 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserY.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasUserY.py @@ -16,7 +16,7 @@ # from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters -from pyspark.ml.param import * +from pyspark.ml.param import Param, Params class HasUserY(Params): diff --git a/py-scoring/src/ai/h2o/sparkling/ml/params/HasValidationLabelCol.py b/py-scoring/src/ai/h2o/sparkling/ml/params/HasValidationLabelCol.py index 4f8901ac05..029c0bb3d9 100644 --- a/py-scoring/src/ai/h2o/sparkling/ml/params/HasValidationLabelCol.py +++ b/py-scoring/src/ai/h2o/sparkling/ml/params/HasValidationLabelCol.py @@ -15,8 +15,7 @@ # limitations under the License. # -from pyspark.ml.param import * - +from pyspark.ml.param import Param, Params from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters diff --git a/py-scoring/src/pysparkling/ml/__init__.py b/py-scoring/src/pysparkling/ml/__init__.py index f4d2f558f7..d6ec618b22 100644 --- a/py-scoring/src/pysparkling/ml/__init__.py +++ b/py-scoring/src/pysparkling/ml/__init__.py @@ -15,7 +15,9 @@ # limitations under the License. # -from pysparkling.ml.models import * + +from pysparkling.initializer import Initializer + __all__ = ["H2OMOJOModel", "H2OSupervisedMOJOModel", "H2OTreeBasedSupervisedMOJOModel", "H2OUnsupervisedMOJOModel", "H2OTreeBasedUnsupervisedMOJOModel", "H2OMOJOPipelineModel", "H2OMOJOSettings", "H2OBinaryModel", @@ -24,6 +26,5 @@ "H2OExtendedIsolationForestMOJOModel", "H2OPCAMOJOModel", "H2OGLRMMOJOModel", "H2OCoxPHMOJOModel", "H2ORuleFitMOJOModel", "H2OWord2VecMOJOModel"] -from pysparkling.initializer import Initializer Initializer.load_sparkling_jar() diff --git a/py/src/ai/h2o/sparkling/ml/Utils.py b/py/src/ai/h2o/sparkling/ml/Utils.py index bac0550fbb..2005f7dc7e 100644 --- a/py/src/ai/h2o/sparkling/ml/Utils.py +++ b/py/src/ai/h2o/sparkling/ml/Utils.py @@ -53,6 +53,6 @@ def fieldDeprecationWarning(kwargs, old, new=None): @staticmethod def __deprecationWarning(old, type, new=None): if new is None: - warnings.warn("The {} '{}' is deprecated without replacement!".format(type, old, new)) + warnings.warn("The {} '{}' is deprecated without replacement!".format(type, old)) else: warnings.warn("The {} '{}' is deprecated. Use '{}' instead!".format(type, old, new)) diff --git a/py/src/ai/h2o/sparkling/ml/features/ColumnPruner.py b/py/src/ai/h2o/sparkling/ml/features/ColumnPruner.py index 85c20b6997..c3f2a526ab 100644 --- a/py/src/ai/h2o/sparkling/ml/features/ColumnPruner.py +++ b/py/src/ai/h2o/sparkling/ml/features/ColumnPruner.py @@ -20,7 +20,7 @@ from ai.h2o.sparkling.ml.Utils import Utils from ai.h2o.sparkling.ml.params.H2OTypeConverters import H2OTypeConverters from pyspark import keyword_only -from pyspark.ml.param.shared import * +from pyspark.ml.param import Param, Params from pyspark.ml.wrapper import JavaTransformer diff --git a/py/src/pysparkling/__init__.py b/py/src/pysparkling/__init__.py index ad30e4abbf..4d9e29058a 100644 --- a/py/src/pysparkling/__init__.py +++ b/py/src/pysparkling/__init__.py @@ -16,7 +16,8 @@ # import warnings - +from pysparkling.context import H2OContext +from pysparkling.conf import H2OConf from pysparkling.initializer import Initializer @@ -29,9 +30,6 @@ def custom_formatwarning(msg, *args, **kwargs): __version__ = Initializer.getVersion() -from pysparkling.context import H2OContext -from pysparkling.conf import H2OConf - Initializer.check_different_h2o() __all__ = ["H2OContext", "H2OConf"]