spark-deep-learning icon indicating copy to clipboard operation
spark-deep-learning copied to clipboard

AttributeError: module 'sparkdl' has no attribute 'graph'

Open CarlosVaquero opened this issue 5 years ago • 3 comments

sparkdl 0.2.2 available in pip returns the following error when importing either DeepImageFeaturizer or KerasTransformer.

It seems there is an incompatibility on the use of KerasImageFileTransformer since keras_image.py has been modified but the graph attribute not.

`--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in 2 from pyspark.ml.evaluation import MulticlassClassificationEvaluator 3 from pyspark.ml import Pipeline ----> 4 from sparkdl import DeepImageFeaturizer 5 6 featurizer = DeepImageFeaturizer(inputCol="image", outputCol="features", modelName="InceptionV3")

/conda/envs/py36/lib/python3.6/site-packages/sparkdl/init.py in 15 16 from sparkdl.image.imageIO import imageSchema, imageType, readImages ---> 17 from sparkdl.transformers.keras_image import KerasImageFileTransformer 18 from sparkdl.transformers.named_image import DeepImagePredictor, DeepImageFeaturizer 19 from sparkdl.transformers.tf_image import TFImageTransformer

/conda/envs/py36/lib/python3.6/site-packages/sparkdl/transformers/keras_image.py in 20 from pyspark.ml.param import Params, TypeConverters 21 ---> 22 import sparkdl.graph.utils as tfx 23 from sparkdl.transformers.keras_utils import KSessionWrap 24 from sparkdl.param import (

AttributeError: module 'sparkdl' has no attribute 'graph'

`

CarlosVaquero avatar Nov 21 '19 20:11 CarlosVaquero

Codecov Report

Merging #452 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #452   +/-   ##
=======================================
  Coverage   87.01%   87.01%           
=======================================
  Files          12       12           
  Lines         562      562           
  Branches      136      136           
=======================================
  Hits          489      489           
  Misses         73       73

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7997c3c...b766f3b. Read the comment docs.

codecov-io avatar Feb 23 '18 19:02 codecov-io