predictionio icon indicating copy to clipboard operation
predictionio copied to clipboard

[WIP] Incorporate the official templates in core repository

Open takezoe opened this issue 6 years ago • 3 comments

I'm considering about incorporate the official templates with main repository to reduce maintenance costs of them. My idea is:

  • Check versions of PredictionIO/Scala/Spark/etc by TravisCI using a shell script and if these versions are not same among PredictionIO and templates, test will fail.
  • Include the official templates and examples in the distribution which is made by make-distribution.sh.
  • Documentations which refer these templates or examples will be fixed to be started from:
    $ cd $PIO_HOME/templates/template-scala-parallel-recommendation
    $ pio build
    ...
    
    instead of:
    $ git clone https://github.com/apache/predictionio-template-recommender.git
    $ cd predictionio-template-recommender
    $ pio build
    ...
    

Currently, for every release, we have to update versions of PredictionIO/Scala/Spark/etc, then create tag for each template repository by hand. If the official templates are in the same repository with PredictionIO itself, we will be able to finish this boring operation at once. Also, it will ensure that all official templates is synchronized with the latest PredictionIO version.

takezoe avatar Nov 19 '18 11:11 takezoe

I think it causes some confusions when new users try to learn PIO and found that they will need to clone the template from another repository. So it is definitely better for us to put it together with the main repo. Since we already have those examples in the main repo, I think it makes a lot of sense.

One question that I will bring up is: Are we still going to use the package org.example.recommendation? or maybe we could change it to org.apache.predictionio.template?

Wei-1 avatar Nov 19 '18 19:11 Wei-1

@Wei-1

Are we still going to use the package org.example.recommendation? or maybe we could change it to org.apache.predictionio.template?

We should locate templates under org.apache.predictionio package if we will distribute templates with distribution. Thanks!

takezoe avatar Nov 19 '18 22:11 takezoe

@takezoe , sorry for the late response.

Basically, I agree with incorporating them into the main repository. I'm concerned about the following before this PR.

  • What templates we incorporate into the main repository We might as well discuss whether we continue to maintain all of the current official templates.

  • Namespace Though the official templates are maintained by committers, they are NOT as part of main modules but as part of examples. I think they should be under examples folder and have org.apache.predictionio.examples package.

shimamoto avatar Dec 12 '18 10:12 shimamoto