spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yanboliang <...@git.apache.org>
Subject [GitHub] spark pull request #13194: [SPARK-15402] [ML] [PySpark] PySpark ml.evaluatio...
Date Wed, 12 Oct 2016 15:34:07 GMT
Github user yanboliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13194#discussion_r83032628
  
    --- Diff: python/pyspark/ml/evaluation.py ---
    @@ -311,19 +330,25 @@ def setParams(self, predictionCol="prediction", labelCol="label",
     
     if __name__ == "__main__":
         import doctest
    +    import tempfile
    +    import pyspark.ml.evaluation
         from pyspark.sql import SparkSession
    -    globs = globals().copy()
    +    globs = pyspark.ml.evaluation.__dict__.copy()
         # The small batch size here ensures that we see multiple batches,
         # even in these small test examples:
         spark = SparkSession.builder\
             .master("local[2]")\
             .appName("ml.evaluation tests")\
             .getOrCreate()
    -    sc = spark.sparkContext
    -    globs['sc'] = sc
         globs['spark'] = spark
    -    (failure_count, test_count) = doctest.testmod(
    -        globs=globs, optionflags=doctest.ELLIPSIS)
    -    spark.stop()
    -    if failure_count:
    -        exit(-1)
    --- End diff --
    
    Thanks for remind, added check ```failure_count```.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message