Skip to content

Commit c5e9024

Browse files
committed
PDIO-438
1 parent ffa04e5 commit c5e9024

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

examples/demo-movielens/batch_import.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def batch_import_task(app_data, client, all_info=False):
7171
iid=v.iid,
7272
event_time=event_time,
7373
properties={
74-
"pio_itypes": list(itypes),
75-
"pio_starttime": release_datetime.isoformat(),
74+
"itypes": list(itypes),
75+
"starttime": release_datetime.isoformat(),
7676
"name": utf8_name,
7777
"year": v.year } )
7878

@@ -94,12 +94,12 @@ def batch_import_task(app_data, client, all_info=False):
9494
sys.stdout.write('\r[Info] %s' % count)
9595
sys.stdout.flush()
9696

97-
properties = { "pio_rating" : int(v.rating) }
97+
properties = { "rating" : int(v.rating) }
9898
req = client.acreate_event(
9999
event="rate",
100-
entity_type="pio_user",
100+
entity_type="user",
101101
entity_id=v.uid,
102-
target_entity_type="pio_item",
102+
target_entity_type="item",
103103
target_entity_id=v.iid,
104104
properties=properties,
105105
event_time=v.t.replace(tzinfo=pytz.utc),

examples/itemrank_quick_start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def import_itemrank(access_key):
2727
for item_id in item_ids:
2828
print "Set item", item_id
2929
client.set_item(item_id, {
30-
"pio_itypes" : ['1']
30+
"itypes" : ['1']
3131
})
3232

3333
# each user randomly views 10 items

predictionio/__init__.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66

77

8-
__version__ = "0.8.2"
8+
__version__ = "0.8.3"
99

1010
# import deprecated libraries.
1111
from predictionio.obsolete import Client
@@ -288,11 +288,11 @@ def aset_user(self, uid, properties={}, event_time=None):
288288
"""Set properties of a user.
289289
290290
Wrapper of acreate_event function, setting event to "$set" and entity_type
291-
to "pio_user".
291+
to "user".
292292
"""
293293
return self.acreate_event(
294294
event="$set",
295-
entity_type="pio_user",
295+
entity_type="user",
296296
entity_id=uid,
297297
properties=properties,
298298
event_time=event_time,
@@ -306,12 +306,12 @@ def aunset_user(self, uid, properties, event_time=None):
306306
"""Unset properties of an user.
307307
308308
Wrapper of acreate_event function, setting event to "$unset" and entity_type
309-
to "pio_user".
309+
to "user".
310310
"""
311311
# check properties={}, it cannot be empty
312312
return self.acreate_event(
313313
event="$unset",
314-
entity_type="pio_user",
314+
entity_type="user",
315315
entity_id=uid,
316316
properties=properties,
317317
event_time=event_time,
@@ -325,11 +325,11 @@ def adelete_user(self, uid, event_time=None):
325325
"""Delete a user.
326326
327327
Wrapper of acreate_event function, setting event to "$delete" and entity_type
328-
to "pio_user".
328+
to "user".
329329
"""
330330
return self.acreate_event(
331331
event="$delete",
332-
entity_type="pio_user",
332+
entity_type="user",
333333
entity_id=uid,
334334
event_time=event_time)
335335

@@ -341,11 +341,11 @@ def aset_item(self, iid, properties={}, event_time=None):
341341
"""Set properties of an item.
342342
343343
Wrapper of acreate_event function, setting event to "$set" and entity_type
344-
to "pio_item".
344+
to "item".
345345
"""
346346
return self.acreate_event(
347347
event="$set",
348-
entity_type="pio_item",
348+
entity_type="item",
349349
entity_id=iid,
350350
properties=properties,
351351
event_time=event_time)
@@ -358,11 +358,11 @@ def aunset_item(self, iid, properties={}, event_time=None):
358358
"""Unset properties of an item.
359359
360360
Wrapper of acreate_event function, setting event to "$unset" and entity_type
361-
to "pio_item".
361+
to "item".
362362
"""
363363
return self.acreate_event(
364364
event="$unset",
365-
entity_type="pio_item",
365+
entity_type="item",
366366
entity_id=iid,
367367
properties=properties,
368368
event_time=event_time)
@@ -375,11 +375,11 @@ def adelete_item(self, iid, event_time=None):
375375
"""Delete an item.
376376
377377
Wrapper of acreate_event function, setting event to "$delete" and entity_type
378-
to "pio_item".
378+
to "item".
379379
"""
380380
return self.acreate_event(
381381
event="$delete",
382-
entity_type="pio_item",
382+
entity_type="item",
383383
entity_id=iid,
384384
event_time=event_time)
385385

@@ -391,14 +391,14 @@ def arecord_user_action_on_item(self, action, uid, iid, properties={},
391391
event_time=None):
392392
"""Create a user-to-item action.
393393
394-
Wrapper of acreate_event function, setting entity_type to "pio_user" and
395-
target_entity_type to "pio_item".
394+
Wrapper of acreate_event function, setting entity_type to "user" and
395+
target_entity_type to "item".
396396
"""
397397
return self.acreate_event(
398398
event=action,
399-
entity_type="pio_user",
399+
entity_type="user",
400400
entity_id=uid,
401-
target_entity_type="pio_item",
401+
target_entity_type="item",
402402
target_entity_id=iid,
403403
properties=properties,
404404
event_time=event_time)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='PredictionIO',
13-
version="0.8.2",
13+
version="0.8.3",
1414
author=__author__,
1515
author_email=__email__,
1616
packages=['predictionio'],

0 commit comments

Comments
 (0)