sagravela commited on
Commit
ee016bd
·
1 Parent(s): c21d04d

last model

Browse files
Files changed (43) hide show
  1. inference.py +4 -2
  2. model/ranking_model/fingerprint.pb +2 -2
  3. model/ranking_model/keras_metadata.pb +2 -2
  4. model/ranking_model/saved_model.pb +2 -2
  5. model/ranking_model/variables/variables.data-00000-of-00001 +2 -2
  6. model/ranking_model/variables/variables.index +0 -0
  7. model/retrieval_index/fingerprint.pb +2 -2
  8. model/retrieval_index/keras_metadata.pb +2 -2
  9. model/retrieval_index/saved_model.pb +2 -2
  10. model/retrieval_index/variables/variables.data-00000-of-00001 +2 -2
  11. model/retrieval_index/variables/variables.index +0 -0
  12. products/10330248599300921013/00000000.shard/00000000.snapshot +0 -3
  13. products/1090696620989606176/00000000.shard/00000000.snapshot +0 -3
  14. products/10940474998907749160/00000000.shard/00000000.snapshot +0 -3
  15. products/12840975870241520537/00000000.shard/00000000.snapshot +0 -3
  16. products/13647028138600564413/00000000.shard/00000000.snapshot +0 -3
  17. products/13899418556109793755/00000000.shard/00000000.snapshot +0 -3
  18. products/13990583163695514424/00000000.shard/00000000.snapshot +0 -3
  19. products/14345805792428425891/00000000.shard/00000000.snapshot +0 -3
  20. products/14371466803775709589/00000000.shard/00000000.snapshot +0 -3
  21. products/1578333843238780776/00000000.shard/00000000.snapshot +0 -3
  22. products/16771567014232482436/00000000.shard/00000000.snapshot +0 -3
  23. products/16895535069822258980/00000000.shard/00000000.snapshot +0 -3
  24. products/1728573024296971040/00000000.shard/00000000.snapshot +0 -3
  25. products/17791542437248711493/00000000.shard/00000000.snapshot +0 -3
  26. products/17875886567290137253/00000000.shard/00000000.snapshot +0 -3
  27. products/2088096786386730064/00000000.shard/00000000.snapshot +0 -3
  28. products/{10109334388143567834 → 2103625719028796845}/00000000.shard/00000000.snapshot +0 -0
  29. products/2324640233395721909/00000000.shard/00000000.snapshot +0 -3
  30. products/2521887443494170149/00000000.shard/00000000.snapshot +0 -3
  31. products/2968513013644679377/00000000.shard/00000000.snapshot +0 -3
  32. products/4289417005664533190/00000000.shard/00000000.snapshot +0 -3
  33. products/4680150073302958520/00000000.shard/00000000.snapshot +0 -3
  34. products/5285105494425665764/00000000.shard/00000000.snapshot +0 -3
  35. products/5612963723838050900/00000000.shard/00000000.snapshot +0 -3
  36. products/6294417851453925107/00000000.shard/00000000.snapshot +0 -3
  37. products/8014010485073505966/00000000.shard/00000000.snapshot +0 -3
  38. products/9249320478592962775/00000000.shard/00000000.snapshot +0 -3
  39. products/9662503285985067647/00000000.shard/00000000.snapshot +0 -3
  40. products/9722544657519255032/00000000.shard/00000000.snapshot +0 -3
  41. products/9925691710001970477/00000000.shard/00000000.snapshot +0 -3
  42. products/dataset_spec.pb +1 -1
  43. products/snapshot.metadata +1 -1
inference.py CHANGED
@@ -4,7 +4,8 @@ import os
4
 
5
  class RecommendationEngine():
6
  def __init__(self):
7
- self.product_features = [
 
8
  'product_id', 'product_name', 'category_name',
9
  'merchant_name', 'merchant_state', 'merchant_region',
10
  'free_shipping', 'is_sold_out', 'editor_pick', 'on_sale',
@@ -53,7 +54,8 @@ class RecommendationEngine():
53
  return tf.reduce_any(tf.equal(item['product_id'], self.top_rec[0]))
54
 
55
  def get_score(self, item):
56
- input_data = {k: v for k, v in item.items() if k in self.product_features + list(self.query_input.keys())}
 
57
  _, _, score = self.model(input_data)
58
  item['score'] = score
59
  return item
 
4
 
5
  class RecommendationEngine():
6
  def __init__(self):
7
+ # List of products features used by the model
8
+ self.model_product_features = [
9
  'product_id', 'product_name', 'category_name',
10
  'merchant_name', 'merchant_state', 'merchant_region',
11
  'free_shipping', 'is_sold_out', 'editor_pick', 'on_sale',
 
54
  return tf.reduce_any(tf.equal(item['product_id'], self.top_rec[0]))
55
 
56
  def get_score(self, item):
57
+ # Discard unused features by the model
58
+ input_data = {k: v for k, v in item.items() if k in self.model_product_features + list(self.query_input.keys())}
59
  _, _, score = self.model(input_data)
60
  item['score'] = score
61
  return item
model/ranking_model/fingerprint.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:747d28848bf5124c4859277bd4b3f9210d2106a0c121f6c8120716430eda3f44
3
- size 56
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67d901d2b4e69bb1f820bcd614b2b416db628d64e9fbc20cf9d0e2655a189b3d
3
+ size 55
model/ranking_model/keras_metadata.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:510a6de1c12db4ab4ceec254a573b33aaa659b6183dd573bafc4a4722218d2f8
3
- size 140110
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e065a9f0d693a99306ec038ff2fbad6760a009478ef64b95bcb25ccffce99e4
3
+ size 140116
model/ranking_model/saved_model.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1303c486564926e6dfa8eae9a122390d100a01b1818b89eb763533cd9dd68835
3
- size 2820254
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce76140f88eb4adca56e6e18f6ef6d704064c01898a6cd340e551ea087b12e13
3
+ size 2830232
model/ranking_model/variables/variables.data-00000-of-00001 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2b8b848c9e77055b6b1d170c37aa9e86b7973598ce9b640320e5c7593ea684cd
3
- size 19704630
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25f74189e2d72bfff313e2467cde64f68f70285b94d00645e4ad30a5a12ce0e4
3
+ size 19704612
model/ranking_model/variables/variables.index CHANGED
Binary files a/model/ranking_model/variables/variables.index and b/model/ranking_model/variables/variables.index differ
 
model/retrieval_index/fingerprint.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b4e5fd9a0ebe4e3aa72e93808e01cae5ecf7e37d775e813c687aa872ee07d625
3
- size 56
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3290e60dcad3862359b3aa43c35b1e20f959a81f21fec5937661b2e0e095fab5
3
+ size 57
model/retrieval_index/keras_metadata.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:79eb2ce1e070d9883a5b2d6bb1fd925041b9cb53bf5649955692e0e0352c3b4f
3
- size 42119
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51822379dc02c3ad3f017feed3ef1425a5a1d453ad51656ccc0af76d1746c5ea
3
+ size 42120
model/retrieval_index/saved_model.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4a71ef6982fbe0b4a91eaee5e69cb5d0e9989d829e1822c150b5f59c19ea77b1
3
- size 1404735
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de3c784c901d6e053c3ec8394edc80f28529fa5103113c03313531754911cae4
3
+ size 1404653
model/retrieval_index/variables/variables.data-00000-of-00001 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9f14de9e5d2d5ecb85435126aeee8baa383a8e8a6b141b4d43828eed2de7f286
3
- size 13681253
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c1769802267e6659a1b1a5ef2a90debc1a4107f324896d7eff014f7d5bca825
3
+ size 13681235
model/retrieval_index/variables/variables.index CHANGED
Binary files a/model/retrieval_index/variables/variables.index and b/model/retrieval_index/variables/variables.index differ
 
products/10330248599300921013/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/1090696620989606176/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/10940474998907749160/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/12840975870241520537/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/13647028138600564413/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/13899418556109793755/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/13990583163695514424/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/14345805792428425891/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/14371466803775709589/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/1578333843238780776/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/16771567014232482436/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/16895535069822258980/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/1728573024296971040/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/17791542437248711493/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/17875886567290137253/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/2088096786386730064/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/{10109334388143567834 → 2103625719028796845}/00000000.shard/00000000.snapshot RENAMED
File without changes
products/2324640233395721909/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/2521887443494170149/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/2968513013644679377/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/4289417005664533190/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/4680150073302958520/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/5285105494425665764/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/5612963723838050900/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/6294417851453925107/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/8014010485073505966/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/9249320478592962775/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/9662503285985067647/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/9722544657519255032/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/9925691710001970477/00000000.shard/00000000.snapshot DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a1ce194a527371b013f2fc4653cc3c19cfce313e00d7b0fbcf474a4b537b268
3
- size 5134444
 
 
 
 
products/dataset_spec.pb CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fad3dfaec8451b34989786478e18208d8e5912a041a61bba810c0a540b67a87c
3
  size 411
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01ee76fbbfc70a80e48c1ee20f704f205ce27a88b83328ba911c99f31420a79d
3
  size 411
products/snapshot.metadata CHANGED
@@ -1 +1 @@
1
- 16895535069822258980���� *   0�H�>
 
1
+ 2103625719028796845���̳�� *   0�H�>