Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-8511

Modify ML Python tests to remove saved models

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.1, 1.5.0
    • Component/s: PySpark
    • Labels:
      None

      Description

      According to the reference of python, os.removedirs doesn't work if there are any files in the directory we want to remove.
      https://docs.python.org/3/library/os.html#os.removedirs

      Instead of that, using shutil.rmtree() would be better to remove a temporary directory to test for saving model.
      https://github.com/apache/spark/blob/branch-1.4/python%2Fpyspark%2Fmllib%2Fregression.py#L137

        Attachments

          Activity

            People

            • Assignee:
              yuu.ishikawa@gmail.com Yu Ishikawa
              Reporter:
              yuu.ishikawa@gmail.com Yu Ishikawa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: