predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pat Ferrel <...@occamsmachete.com>
Subject Re: Data clean up
Date Sun, 18 Dec 2016 17:58:17 GMT
There was a bug in this feature in the Apache PIO version that has been fixed in the SNAPSHOT.
We will do a source tag to fix it before the next release . The page you reference is being
changed now to advise an Apache PIO install as the root source of the project going forward.
Keep and eye out here for the announcement.


On Dec 7, 2016, at 9:01 AM, Bruno LEBON <b.lebon@redfakir.fr> wrote:

Hi,

I am following the instructions here: http://actionml.com/docs/pio_versions <http://actionml.com/docs/pio_versions>
to add the possibility to delete events that are too old to template other than Universal
recommender. I want to add it to ecommerce recommendation.

However it doesnt seem to work.

I have the PredicitonIO 097-aml and the template ecommerce-recommendation from apache-incubator
(0.4.0)

I have the following 3  errors:
[ERROR] [Console$] [error] /home/aml/incubator-predictionio-template-ecom-recommender/src/main/scala/DataSource.scala:21:
not found: type SelfCleaningDataSource
[ERROR] [Console$] [error] with SelfCleaningDataSource {
[ERROR] [Console$] [error]      ^
[ERROR] [Console$] [error] /home/aml/incubator-predictionio-template-ecom-recommender/src/main/scala/DataSource.scala:26:
value eventWindow is not a member of org.template.ecommercerecommendation.DataSourceParams
[ERROR] [Console$] [error]   override def eventWindow = dsp.eventWindow
[ERROR] [Console$] [error]                                  ^
[ERROR] [Console$] [error] /home/aml/incubator-predictionio-template-ecom-recommender/src/main/scala/DataSource.scala:31:
not found: value cleanPersistedPEvents
[ERROR] [Console$] [error]     cleanPersistedPEvents(sc)
[ERROR] [Console$] [error]     ^
[ERROR] [Console$] [error] three errors found



The first is related to the fact that DataSourceParams has no object declared, so I added
it in the declaration of the object DataSourceParams but which type should I give to it? Is
it an Object? I dont know Scala, so I am not sure how to modify the code to make it work.
In engine.json it refers to :
  "datasource": {
    "params" : {
      "name": "some-name",
      "appName": "autocleangites22",
      "eventNames": ["view"],
      "eventWindow": {
        "duration": "3650 days",
        "removeDuplicates": false,
        "compressProperties": false
      }
    }
so the code accesses to eventWindow.duration.


The second error says that the interface (that would be called so in Java at least) SelfCleaningDataSource
is not found in PredictionIO. When I have a look at the code I find the interface, under some
annotation @DeveloperApi:
@DeveloperApi
trait SelfCleaningDataSource {

and here too (for the method generating the third error):
@DeveloperApi
  def cleanPersistedPEvents(sc: SparkContext): Unit ={

which makes me wonder whether there is a special way to compile the source code so that the
code under this annotation is to be added? 

Thanks in advance for your help,
Bruno



Mime
View raw message