From 6ef749a51912af9dc77b596867f10688a2555638 Mon Sep 17 00:00:00 2001 From: danielenricocahall Date: Sun, 31 Jan 2021 17:16:27 -0500 Subject: [PATCH] use getter instead of creating local var and update version --- elephas/ml_model.py | 3 +-- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/elephas/ml_model.py b/elephas/ml_model.py index 5046e1f..0f8b857 100644 --- a/elephas/ml_model.py +++ b/elephas/ml_model.py @@ -178,7 +178,6 @@ def _transform(self, df): """ output_col = self.getOutputCol() label_col = self.getLabelCol() - features_col = self.getFeaturesCol() new_schema = copy.deepcopy(df.schema) new_schema.add(StructField(output_col, StringType(), True)) rdd = df.rdd @@ -199,7 +198,7 @@ def extract_features_and_predict(model_yaml: str, partial(extract_features_and_predict, self.get_keras_model_config(), self.get_custom_objects(), - features_col, + self.getFeaturesCol(), self.model_type)) if self.model_type == ModelType.CLASSIFICATION: predictions = predictions.map(lambda x: tuple(str(x))) diff --git a/setup.py b/setup.py index 51a945b..5e26bff 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,10 @@ from setuptools import find_packages setup(name='elephas', - version='1.2.1', + version='1.3.1', description='Deep learning on Spark with Keras', url='http://github.com/maxpumperla/elephas', - download_url='https://github.com/maxpumperla/elephas/tarball/1.2.1', + download_url='https://github.com/maxpumperla/elephas/tarball/1.3.1', author='Daniel Cahall', author_email='danielenricocahall@gmail.com', install_requires=['cython',