Advertisement
Advertisement

More Related Content

More from Flink Forward(20)

Advertisement

Flink Forward Berlin 2017: Daniel Berecz, Gabor Hermann - Parameter Server on Flink, an approach for model-serving parallel machine learning

  1. Parameter Server on Flink an approach for model-parallel machine learning Gábor Hermann mail@gaborhermann.com Dániel Berecz berecz.daniel@sztaki.mta.hu This project has received funding from the European Union’s Horizon 2020 research and innovation program under grant agreement No 688191.
  2. About us • Institute for Computer Science and Control, Hungarian Academy of Sciences (MTA SZTAKI) • Informatics Laboratory • „Big Data – Momemtum” research group • „Data Mining and Search” research group • Research group with strong industry ties • Ericsson, Rovio, Portugal Telekom, etc.
  3. DISCLAIMER • Gábor Hermann works at Bol.com • Largest e-commerce platform in the Netherlands and Belgium
  4. Agenda 1. Model-parallel training 2. Parameter Server on Flink Streaming 3. Batch on streaming?
  5. Model-parallel training
  6. Spam filtering Hey, how are you… Free money for you... One click, free sex... …
  7. Spam filtering Hey, how are you… ü Free money for you... û One click, free sex... û …
  8. Spam filtering Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û …
  9. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 … 0 0 0 𝑋 0
  10. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 free how … 0 0 0 𝑋 0
  11. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 +1 -1 free how +1 … 0 0 0 𝑋 𝑦 0
  12. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑋 𝑦 𝑤 0 𝑋 $ 𝑤 ≈ 𝑦
  13. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 01 +1 … 0 0 0 𝑤 0 𝑋 𝑦 𝑋 $ 𝑤 ≈ 𝑦
  14. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 01 +1 … 0 0 0 𝑤 0 𝑋 𝑦 𝑋 $ 𝑤 ≈ 𝑦
  15. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 01 +1 … 0 0 0 𝑤 0 𝑋 𝑦 𝑋 $ 𝑤 ≈ 𝑦
  16. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ? One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 01 +1 … 0 0 0 -4 𝑤 0 𝑋 𝑦 𝑋 $ 𝑤 ≈ 𝑦
  17. Spam filtering 0 0 0 Hey, how are you… ü Free money for you... û Hi, how was FF2017… ü One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 01 +1 … 0 0 0 -4 𝑤 0 𝑋 𝑦 𝑋 $ 𝑤 ≈ 𝑦
  18. Spam filtering with Passive-Aggressive algorithm ? ? ?
  19. Spam filtering with Passive-Aggressive algorithm 0 0 Free money for you... û 0 1 0 +1 free how 2 7 0 𝑤 0 𝑋 𝑦
  20. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û 0 1 0 1 +1 -1 free how 2 7 0 0 𝑤 0 𝑋 𝑦
  21. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û 0 1 0 1 +1 -1 free how 2 7 0 0 𝑤 0 𝑋 𝑦
  22. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û 0 1 0 1 +1 -1 free how -4 7 0 0 𝑤 0 𝑋 𝑦
  23. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û 0 1 0 1 +1 -1 free how -4 7 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) 𝑋 𝑦
  24. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) 𝑋 𝑦
  25. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) 𝑋 𝑦
  26. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) 𝑋 𝑦
  27. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) laaarge 𝑋 𝑦
  28. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) laaarge model- parallel 𝑋 𝑦
  29. Spam filtering with Passive-Aggressive algorithm 0 0 0 Hey, how are you… ü Free money for you... û One click, free sex... û 0 1 0 1 1 +1 -1 free how -4 7 +1 … 0 0 0 𝑤 0 Crammer et al.: Online Passive-Aggressive Algorithms (2006) laaarge model- parallel 𝑋 𝑦
  30. 𝑅 Recommendation with matrix factorization 5 1 3 5 2 0 0 0 0 Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars
  31. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars
  32. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar min -∗,0∗ 1 𝑟34 − 𝜇 − 𝑏3 − 𝑏4 − 𝑢3 𝑖4 : (3,4)∈@A + +𝜆 1 ( 𝑢3 : 3∈@D + 𝑏3 : ) + 𝜆 1 ( 4∈@E 𝑖4 : + 𝑏4 : ) Dániel rated Iron Man with 5 stars
  33. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor ? 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars Would Gábor like Interstellar?
  34. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor ? 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars Would Gábor like Interstellar?
  35. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor ? 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars Would Gábor like Interstellar? 5 4 -4 3 2 5
  36. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor ? 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars Would Gábor like Interstellar? 5 4 -4 3 2 5 3
  37. 𝑅 Recommendation with matrix factorization 𝑈 𝑈 $ 𝐼 ≈ 𝑅 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 2 Level of action Level of drama X factor 3 0 0 0 0 Latent factors Dániel Gábor Iron Man Interstellar Dániel rated Iron Man with 5 stars Would Gábor like Interstellar? 5 4 -4 3 2 5 3
  38. 𝑅 Matrix factorization training 𝑈 item vector 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 user vector 5 3 0 0 0 0 Dániel Gábor Iron Man Interstellar 2
  39. 𝑅 Matrix factorization training 𝑈 item vector 3 2 6 5 3 2 5 -6 -2 5 4 -4 5 1 3 user vector 5 2 3 0 0 0 0 Dániel Gábor Iron Man Interstellar
  40. 𝑅 Matrix factorization training 𝑈 item vector 1 3 5 5 3 2 4 -5 -1 5 4 -4 5 1 3 user vector 5 2 3 0 0 0 0 Dániel Gábor Iron Man Interstellar
  41. 𝑅 Matrix factorization training 𝑈 item vector 1 3 5 5 3 2 4 -5 -1 5 4 -4 5 1 3 user vector 5 2 3 0 0 0 0 Dániel Gábor Iron Man Interstellar model-parallel
  42. Parameter Server on Flink
  43. Parameter Server workers server nodes data pull push
  44. Passive-Aggressive with Parameter Server 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦
  45. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦
  46. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦
  47. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  48. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  49. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  50. Passive-Aggressive with Parameter Server workers server nodes pull 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  51. Passive-Aggressive with Parameter Server workers server nodes pull answer 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  52. Passive-Aggressive with Parameter Server workers server nodes pull answer 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  53. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  54. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  55. Passive-Aggressive with Parameter Server workers server nodes push 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  56. Passive-Aggressive with Parameter Server workers server nodes push 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  57. Passive-Aggressive with Parameter Server workers server nodes 0 0 0 1 0 1 1 +1 -1 -4 7 +10 0 0 𝑤 𝑋 𝑦 𝑋, 𝑦 𝑤
  58. Parameter Server API workers server nodes data pull push
  59. Parameter Server API ps.pull(paramId) ps.push(paramId, paramUpdate) workers server nodes data pull push
  60. Parameter Server API workers server nodes data pull push ps.pull(paramId) ps.push(paramId, paramUpdate) def onRecv(data): Unit
  61. Parameter Server API workers server nodes data pull push ps.pull(paramId) ps.push(paramId, paramUpdate) def onRecv(data): Unit def onPullRecv(paramId, paramValue)
  62. Passive-Aggressive code def onRecv(x: LabeledVector) = { def onPullRecv(paramId: Int, param: Double) = {
  63. Passive-Aggressive code def onRecv(x: LabeledVector) = { cacheLocally(x) def onPullRecv(paramId: Int, param: Double) = {
  64. Passive-Aggressive code def onRecv(x: LabeledVector) = { cacheLocally(x) x.indices.foreach { i => ps.pull(i) } } def onPullRecv(paramId: Int, param: Double) = {
  65. Passive-Aggressive code def onRecv(x: LabeledVector) = { cacheLocally(x) x.indices.foreach { i => ps.pull(i) } } def onPullRecv(paramId: Int, param: Double) = { cacheOrCompute(paramId, param, { (x, w) =>
  66. Passive-Aggressive code def onRecv(x: LabeledVector) = { cacheLocally(x) x.indices.foreach { i => ps.pull(i) } } def onPullRecv(paramId: Int, param: Double) = { cacheOrCompute(paramId, param, { (x, w) => val deltaW = passiveAggressiveUpdate(x, w)
  67. Passive-Aggressive code def onRecv(x: LabeledVector) = { cacheLocally(x) x.indices.foreach { i => ps.pull(i) } } def onPullRecv(paramId: Int, param: Double) = { cacheOrCompute(paramId, param, { (x, w) => val deltaW = passiveAggressiveUpdate(x, w) deltaW.foreach { (pId, pDelta) => ps.push(pId, pDelta) } }) }
  68. Matrix factorization with Parameter Server 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0
  69. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 𝑅
  70. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 𝐼 𝑈 𝑅
  71. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  72. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  73. Matrix factorization with Parameter Server workers server nodes pull 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  74. Matrix factorization with Parameter Server workers server nodes pull answer 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  75. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  76. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  77. Matrix factorization with Parameter Server workers server nodes push 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  78. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  79. Matrix factorization with Parameter Server workers server nodes 𝑅𝑈 3 2 5 5 3 2 5 -6 -1 5 4 -4 5 1 3 5 3 0 0 0 0 2 𝐼 𝑈 𝑅
  80. Matrix Factorization code (SGD) def onRecv(r: Rating) = { def onPullRecv(paramId: Int, param: Vector) = {
  81. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) def onPullRecv(paramId: Int, param: Vector) = {
  82. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = {
  83. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = { val itemId = paramId val item = param
  84. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = { val itemId = paramId val item = param val (r, userId, _) = waitQueues(itemId).pop()
  85. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = { val itemId = paramId val item = param val (r, userId, _) = waitQueues(itemId).pop() val user = users(userId)
  86. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = { val itemId = paramId val item = param val (r, userId, _) = waitQueues(itemId).pop() val user = users(userId) val (userDelta, itemDelta) = updateWithSGD(user, item, r)
  87. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = { val itemId = paramId val item = param val (r, userId, _) = waitQueues(itemId).pop() val user = users(userId) val (userDelta, itemDelta) = updateWithSGD(user, item, r) ps.push(itemId, itemDelta)
  88. Matrix Factorization code (SGD) def onRecv(r: Rating) = { waitQueues(r.itemId).add(r) ps.pull(r.itemId) } def onPullRecv(paramId: Int, param: Vector) = { val itemId = paramId val item = param val (r, userId, _) = waitQueues(itemId).pop() val user = users(userId) val (userDelta, itemDelta) = updateWithSGD(user, item, r) ps.push(itemId, itemDelta) users(userId) += userDelta }
  89. Integration with Flink Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  90. Integration with Flink val input: DataStream[Data] = ... val output: DataStream[Either[PSOutput, WorkerOutput]] = psTransform(input, onRecv, onPullRecv)
  91. Implementation? Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  92. Implementation? Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server ?
  93. Implementation: Loops API Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  94. Implementation: Loops API Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE
  95. Implementation: Loops API Parameter Server API Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE
  96. Implementation: Loops API Parameter Server API Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE busy
  97. Implementation: Loops API Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE busy
  98. Implementation: Loops API Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE busy busy
  99. Implementation: Loops API Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE busy busy deadlock
  100. Implementation: Loops API Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server NOT MATURE WIP: FLIP-15 FLIP-16
  101. Batch on streaming?
  102. Batch vs streaming?
  103. Batch vs streaming? Offline vs online?
  104. Online on streaming Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  105. Online on streaming Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  106. Offline on streaming? Parameter Server API Pull, Push Answer pull DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  107. Offline on streaming? Parameter Server API DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  108. Offline on streaming? Parameter Server API DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  109. Offline on streaming? Parameter Server API Push same param? DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server
  110. Offline on streaming? Parameter Server API Push same param? DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server Write conflict!
  111. Offline on streaming? Parameter Server API Push same param? DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server Write conflict! Synchronization?
  112. Offline on streaming? Parameter Server API Push same param? DataSource Transformations DataSink DataStream of input data DataStream of Worker and PS output Worker Parameter Server Write conflict! Asynchronous training!
  113. Flink Batch vs Streaming for Offline
  114. Async matrix factorization
  115. Async matrix factorization
  116. Combine offline+online!
  117. Thank you for your attention Gábor Hermann mail@gaborhermann.com Dániel Berecz berecz.daniel@sztaki.mta.hu Source code: https://github.com/gaborhermann/flink-parameter-server https://github.com/rpalovics/Alpenglow Li et al.: "Scaling Distributed Machine Learning with the Parameter Server" 2014. Schelter et al.: "Factorbird - A Parameter Server Approach to Distributed Matrix Factorization." 2014. Gemulla et al.: "Large-scale matrix factorization with distributed stochastic gradient descent” 2011. Crammer et al.: ”Online Passive-Aggressive Algorithms” 2006.
  118. Measurements
  119. Flink Batch vs Streaming for Offline • Movielens 1M movie rating dataset • 6000 user, 4000 movies
  120. Flink vs Alpenglow • Based on public LastFM crawl • Filtered to avoid spammers • Lasts 1 year • Around 45.000 users and 49.000 items
Advertisement