Re: Empty result even though there are events

2017-04-04 Thread Vaghawan Ojha
Oh, Ok. That's my mistake then. I think creating a new app would solve the
problem.

Thanks


On Wed, Apr 5, 2017 at 9:04 AM, Donald Szeto  wrote:

> Are you using the appName in engine.json that corresponds to the appId you
> used when you did `pio import`? Setting a new appName in engine.json will
> not automatically create a new app. Apps are created when you do `pio app
> new`.
>
> On Tue, Apr 4, 2017 at 8:13 PM Vaghawan Ojha 
> wrote:
>
> Hi,
>
> Yes, I couldn't use different appName. Even when I changed the appName in
> engine.json and did pio build, the app name in pio app list still reamins
> the same. Something to do with the pio itself, I guess.
>
> Thank you very much for your support.
>
> On Mon, Apr 3, 2017 at 6:58 PM, Pat Ferrel  wrote:
>
> I am unclear. What is the problem? You can’t use different datasets
> (different appNames)?
>
> What is the output of `pio app list`
>
>
> On Apr 2, 2017, at 9:06 PM, Vaghawan Ojha  wrote:
>
> Hi,
>
> Thank you, I did the changes. But whenever I changed the appname and did
> pio build its Ok, but while training it says invalid appname for any other
> app name. I'm missing something, however when I left the appname as
> handmade, it works.
>
> Now the data and recommendation are all working. Thank you very much, I
> used engine.json.minimum. I will be testing other features, like cart
> recommendation. Here's 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.mb": "300",
> "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",
> "eventNames": ["purchase", "view"]
>   }
> }
>   ]
> }
>
> I was very curious, what does this means: "name":
> "sample-handmade-data.txt",
> Thanks
>
>
> On Sat, Apr 1, 2017 at 1:29 AM, Pat Ferrel  wrote:
>
> You have active date range filters and no dates in your data. This is
> because you are using the engine.json from the integration test, which uses
> that config.
>
> Start form engine.json.minimum and set the appName for your data and the
> eventNames you will use.
>
>
> On Mar 31, 2017, at 12:52 AM, Vaghawan Ojha  wrote:
>
> More info: I don't have the secondary event like "View" in my data, I just
> don't collect the view event, since I'm using old purchased history of the
> user.
>
> With integration test data everything is Ok, but with my real data, it's
> not.  All the data looks like this with varying item_id and user_id. There
> is no view events.
>
> {"entityId":"00068116","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM8941"}
> {"entityId":"00068116","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM8920"}
> {"entityId":"00088894","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM66336"}
> {"entityId":"00097710","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM42110"}
> {"entityId":"00097710","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM61833"}
> {"entityId":"00097710","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM65826"}
> {"entityId":"00097710","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM40182"}
> {"entityId":"00097710","entityType":"user","event":"
> purchase","targetEntityType":"item","targetEntityId":"BM5001"}
>
> Is my data wrong? I am able to successfully  train and deploy the engine.
>
> On Fri, Mar 31, 2017 at 11:40 AM, Vaghawan Ojha  w
> rote:
>
> I've 5 transection data for experiment. I don't  think it's the data
> because with the same data I could get recommendation using Recommendation
> template.
>
> On Fri, Mar 31, 2017 at 11:29 AM, Vaghawan Ojha  w
> rote:
>
> Hi,
>
> 

Re: Empty result even though there are events

2017-04-04 Thread Donald Szeto
Are you using the appName in engine.json that corresponds to the appId you
used when you did `pio import`? Setting a new appName in engine.json will
not automatically create a new app. Apps are created when you do `pio app
new`.

On Tue, Apr 4, 2017 at 8:13 PM Vaghawan Ojha  wrote:

Hi,

Yes, I couldn't use different appName. Even when I changed the appName in
engine.json and did pio build, the app name in pio app list still reamins
the same. Something to do with the pio itself, I guess.

Thank you very much for your support.

On Mon, Apr 3, 2017 at 6:58 PM, Pat Ferrel  wrote:

I am unclear. What is the problem? You can’t use different datasets
(different appNames)?

What is the output of `pio app list`


On Apr 2, 2017, at 9:06 PM, Vaghawan Ojha  wrote:

Hi,

Thank you, I did the changes. But whenever I changed the appname and did
pio build its Ok, but while training it says invalid appname for any other
app name. I'm missing something, however when I left the appname as
handmade, it works.

Now the data and recommendation are all working. Thank you very much, I
used engine.json.minimum. I will be testing other features, like cart
recommendation. Here's 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.mb": "300",
"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",
"eventNames": ["purchase", "view"]
  }
}
  ]
}

I was very curious, what does this means: "name":
"sample-handmade-data.txt",
Thanks


On Sat, Apr 1, 2017 at 1:29 AM, Pat Ferrel  wrote:

You have active date range filters and no dates in your data. This is
because you are using the engine.json from the integration test, which uses
that config.

Start form engine.json.minimum and set the appName for your data and the
eventNames you will use.


On Mar 31, 2017, at 12:52 AM, Vaghawan Ojha  wrote:

More info: I don't have the secondary event like "View" in my data, I just
don't collect the view event, since I'm using old purchased history of the
user.

With integration test data everything is Ok, but with my real data, it's
not.  All the data looks like this with varying item_id and user_id. There
is no view events.

{"entityId":"00068116","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM8941"}
{"entityId":"00068116","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM8920"}
{"entityId":"00088894","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM66336"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM42110"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM61833"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM65826"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM40182"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM5001"}

Is my data wrong? I am able to successfully  train and deploy the engine.

On Fri, Mar 31, 2017 at 11:40 AM, Vaghawan Ojha 
wrote:

I've 5 transection data for experiment. I don't  think it's the data
because with the same data I could get recommendation using Recommendation
template.

On Fri, Mar 31, 2017 at 11:29 AM, Vaghawan Ojha 
wrote:

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 

Re: Empty result even though there are events

2017-03-31 Thread Vaghawan Ojha
More info: I don't have the secondary event like "View" in my data, I just
don't collect the view event, since I'm using old purchased history of the
user.

With integration test data everything is Ok, but with my real data, it's
not.  All the data looks like this with varying item_id and user_id. There
is no view events.

{"entityId":"00068116","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM8941"}
{"entityId":"00068116","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM8920"}
{"entityId":"00088894","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM66336"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM42110"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM61833"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM65826"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM40182"}
{"entityId":"00097710","entityType":"user","event":"purchase","targetEntityType":"item","targetEntityId":"BM5001"}

Is my data wrong? I am able to successfully  train and deploy the engine.

On Fri, Mar 31, 2017 at 11:40 AM, Vaghawan Ojha 
wrote:

> I've 5 transection data for experiment. I don't  think it's the data
> because with the same data I could get recommendation using Recommendation
> template.
>
> On Fri, Mar 31, 2017 at 11:29 AM, Vaghawan Ojha 
> wrote:
>
>> 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.
>>
>
>


Re: Empty result even though there are events

2017-03-30 Thread Vaghawan Ojha
I've 5 transection data for experiment. I don't  think it's the data
because with the same data I could get recommendation using Recommendation
template.

On Fri, Mar 31, 2017 at 11:29 AM, Vaghawan Ojha 
wrote:

> 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.
>