Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19845#discussion_r153966424
  
    --- Diff: python/pyspark/ml/image.py ---
    @@ -180,9 +180,8 @@ def readImages(self, path, recursive=False, 
numPartitions=-1,
             .. versionadded:: 2.3.0
             """
     
    -        ctx = SparkContext._active_spark_context
    -        spark = SparkSession(ctx)
    -        image_schema = ctx._jvm.org.apache.spark.ml.image.ImageSchema
    +        spark = SparkSession.builder.getOrCreate()
    --- End diff --
    
    Yeah, I think this should be best practice to initialize `SparkSession`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to