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

Add @Since annotation to stable and experimental methods in MLlib

    XMLWordPrintableJSON

Details

    • Umbrella
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • Documentation, MLlib

    Description

      This is useful to check whether a feature exists in some version of Spark. This is an umbrella JIRA to track the progress. We want to have @since tag @Since annotation for both stable (those without any Experimental/DeveloperApi/AlphaComponent annotations) and experimental methods in MLlib:

      (Do NOT tag private or package private classes or methods, nor local variables and methods.)

      We need to dig the history of git commit to figure out what was the Spark version when a method was first introduced. Take `NaiveBayes.setModelType` as an example. We can grep `def setModelType` at different version git tags.

      meng@xm:~/src/spark
      $ git show v1.3.0:mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala | grep "def setModelType"
      meng@xm:~/src/spark
      $ git show v1.4.0:mllib/src/main/scala/org/apache/spark/mllib/classification/NaiveBayes.scala | grep "def setModelType"
        def setModelType(modelType: String): NaiveBayes = {
      

      If there are better ways, please let us know.

      We cannot add all @since tags @Since annotation in a single PR, which is hard to review. So we made some subtasks for each package, for example `org.apache.spark.classification`. Feel free to add more sub-tasks for Python and the `spark.ml` package.

      Plan:

      1. In 1.5, we try to add @Since annotation to all stable/experimental methods under `spark.mllib`.
      2. Starting from 1.6, we require @Since annotation in all new PRs.
      3. In 1.6, we try to add @SInce annotation to all stable/experimental methods under `spark.ml`, `pyspark.mllib`, and `pyspark.ml`.

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              mengxr Xiangrui Meng
              mengxr Xiangrui Meng
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 19.5h
                  19.5h
                  Remaining:
                  Remaining Estimate - 19.5h
                  19.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified