predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vaghawan Ojha <vaghawan...@gmail.com>
Subject Empty result even though there are events
Date Fri, 31 Mar 2017 05:44:35 GMT
Hi,

I imported the bulk data using pio import --appid (id) --input  data.json .
The import was successful, then I build and trained and deployed the UR,
but when I query the server, it always returns a empty
json {"itemScores":[]} .


I think,  I must be missing something in the config, here is my engine.json

{
  "comment":" This config file uses default settings for all but the
required values see README.md for docs",
  "id": "default",
  "description": "Default settings",
  "engineFactory": "org.template.RecommendationEngine",
  "datasource": {
    "params" : {
      "name": "sample-handmade-data.txt",
      "appName": "handmade",
      "eventNames": ["purchase", "view"]
    }
  },
  "sparkConf": {
    "spark.serializer": "org.apache.spark.serializer.KryoSerializer",
    "spark.kryo.registrator":
"org.apache.mahout.sparkbindings.io.MahoutKryoRegistrator",
    "spark.kryo.referenceTracking": "false",
    "spark.kryoserializer.buffer": "300m",
    "es.index.auto.create": "true"
  },
  "algorithms": [
    {
      "comment": "simplest setup where all values are default, popularity
based backfill, must add eventsNames",
      "name": "ur",
      "params": {
        "appName": "handmade",
        "indexName": "urindex",
        "typeName": "items",
        "comment": "must have data for the first event or the model will
not build, other events are optional",
        "indicators": [
          {
            "name": "purchase"
          },{
            "name": "view",
            "maxCorrelatorsPerItem": 50
          }
        ],
        "availableDateName": "available",
        "expireDateName": "expires",
        "dateName": "date",
        "num": 4
      }
    }
  ]
}

is the data supposed to come from the sample-handmade-data.txt? I'm not
sure this is weird. My json data import and trains correctly without an
error. And example integration runs fine.

Mime
View raw message