$30 off During Our Annual Pro Sale. View Details »

Demae-can Machine Learning Pipeline and Continuous Product Improvement

Demae-can Machine Learning Pipeline and Continuous Product Improvement

Hiroo Takaku (Demae-can / Machine Learning Team / Technical Product Manager)

https://tech-verse.me/ja/sessions/118
https://tech-verse.me/en/sessions/118
https://tech-verse.me/ko/sessions/118

Tech-Verse2022
PRO

November 17, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. View Slide

  2. Overview
    Machine learning pipeline
    • Automate ML process for continuous improvement and stable operation
    • Build ML pipeline to connect each process

    View Slide

  3. Overview
    Machine learning pipeline
    • Automate ML process for continuous improvement and stable operation
    • Build ML pipeline to connect each process
    Continuous product improvement
    • ML components affect each other and unexpected things occur
    • Identify problems and improve the products with data

    View Slide

  4. Target audience
    Data scientist ML engineer Software engineer

    View Slide

  5. Target audience
    Data scientist ML engineer Software engineer
    and all people who are interested in ML

    View Slide

  6. Agenda
    - What service Demae-can provides
    - How ML components work
    - What ML pipeline we builds
    - Continuous improvement of ML products

    View Slide

  7. What service
    Demae-can provides

    View Slide

  8. Demae-can is a multi-sided platform
    User

    View Slide

  9. Demae-can is a multi-sided platform
    Driver
    User

    View Slide

  10. Demae-can is a multi-sided platform
    User
    Merchant / Shop Driver

    View Slide

  11. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order (user)

    View Slide

  12. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order offer
    Order (user)

    View Slide

  13. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order offer
    Order (user)
    Item preparation
    (merchant)

    View Slide

  14. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order offer Delivery offer
    Order (user)
    Item preparation
    (merchant)

    View Slide

  15. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order offer Delivery offer
    Item pick up (driver)
    Order (user)
    Item preparation
    (merchant)

    View Slide

  16. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order offer Delivery offer
    Item pick up (driver)
    Delivery
    (driver) Order (user)
    Item preparation
    (merchant)

    View Slide

  17. Demae-can is a multi-sided platform
    Driver
    User
    Merchant / Shop
    Order offer Delivery offer
    Item pick up (driver)
    Delivery
    (driver) Order (user)
    Item preparation
    (merchant)
    • Foods
    • Daily necessities
    • Medicine

    View Slide

  18. What ML components
    we build

    View Slide

  19. User problem
    • Tons of foods, drinks and other delivery
    items to choose from
    • Difficult to find new options
    Solution
    • Suggest items users don't know about yet
    Recommendations

    View Slide

  20. User demand
    • Want to know when deliveries will arrive
    Solution
    • Show the expected arrival time
    Delivery time prediction

    View Slide

  21. Driver demand
    • Want to know where driver can receive
    lots of delivery offers
    Solution
    • Show areas with expected high
    demand and few drivers
    Order forecast

    View Slide

  22. Driver demand
    • Want to increase delivery offers & income
    • Want to pick up items for delivery and
    nearby shops
    • Don’t want to wait for orders to be ready
    Solution
    • Provide globally-efficient order-driver
    allocation
    Delivery offer (Order dispatch)

    View Slide

  23. How ML components work

    View Slide

  24. You see the details of ML
    components on
    LINE DEVELOPER DAY 2021
    YouTube
    https://www.youtube.com/watch?v=LN38JM2Oo1c
    logmi
    https://logmi.jp/tech/articles/325404
    The details of ML components

    View Slide

  25. Item preparation time prediction
    (Delivery time prediction)

    View Slide

  26. Item preparation time prediction
    order arrive at shop
    items ready
    delivery time
    arrive at destination

    View Slide

  27. Item preparation time prediction
    order arrive at shop
    items ready
    item preparation time
    delivery time
    arrive at destination

    View Slide

  28. Item preparation time prediction
    order arrive at shop
    items ready
    item preparation time
    delivery time
    shop arrival time
    arrive at destination

    View Slide

  29. Item preparation time prediction
    order arrive at shop
    items ready
    item preparation time travel time from shop to destination
    delivery time
    shop arrival time
    arrive at destination

    View Slide

  30. Item preparation time prediction
    order arrive at shop
    items ready arrive at destination
    item preparation time (a) travel time from shop to destination (c)
    delivery time (d)
    shop arrival time (b)
    d = max(a, b) + c

    View Slide

  31. Item preparation time prediction
    order arrive at shop
    items ready
    item preparation time (a) travel time from shop to destination (c)
    delivery time (d)
    shop arrival time (b)
    d = max(a, b) + c
    Prediction
    arrive at destination

    View Slide

  32. Item preparation time prediction
    Model
    • lightGBM (daily update)

    View Slide

  33. Item preparation time prediction
    Model
    • lightGBM (daily update)
    Real time feature
    • Item pick up time (≒item preparation time)
    in the last n minutes

    View Slide

  34. Item preparation time prediction
    Model
    • lightGBM (daily update)
    Real time feature
    • Item pick up time (≒item preparation time)
    in the last n minutes
    • Ratio of (number of drivers) / (number of orders)
    in the last n minutes

    View Slide

  35. Item preparation time prediction
    Model
    • lightGBM (daily update)
    Real time feature
    • Item pick up time (≒item preparation time)
    in the last n minutes
    • Ratio of (number of drivers) / (number of orders)
    in the last n minutes
    Offline feature
    • shop info / genre info etc. (daily update)

    View Slide

  36. Use ML models that created with latest data
    Use real time features that created with latest data
    Summary
    Use offline features that created with latest data

    View Slide

  37. What ML pipeline
    Demae-can builds

    View Slide

  38. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement

    View Slide

  39. ML process or lifecycle
    Model
    verification
    Model
    training
    Data
    ETL
    Data
    collection
    Monitoring
    Deployment
    Automation & pipeline orchestration

    View Slide

  40. ML process or lifecycle
    Model
    verification
    Model
    training
    Data
    ETL
    Data
    collection
    Monitoring
    Deployment
    Automation & pipeline orchestration
    • Don’t use public cloud service
    • Use self-managed k8s cluster, Hadoop cluster (DWH), Kafka cluster

    View Slide

  41. ML process or lifecycle
    Model
    verification
    Model
    training
    Data
    ETL
    Data
    collection
    Monitoring
    Deployment
    Automation & pipeline orchestration
    • Don’t use public cloud service
    • Use self-managed k8s cluster, Hadoop cluster (DWH), Kafka cluster
    • Use Airflow (workflow), ArgoCD (CD), MLflow (ML lifecycle management)

    View Slide

  42. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement

    View Slide

  43. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement
    Data
    collection Data
    ETL

    View Slide

  44. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement
    Model
    training Model
    verification
    Deployment
    Data
    collection Data
    ETL

    View Slide

  45. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement
    Monitoring
    Model
    training Model
    verification
    Deployment
    Data
    collection Data
    ETL

    View Slide

  46. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement
    Monitoring
    Model
    training Model
    verification
    Deployment
    Data
    collection Data
    ETL

    View Slide

  47. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Data collection & Data ETL
    ML real time system
    Prediction
    server
    Demae-can
    server
    ML batch system

    View Slide

  48. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Data collection & Data ETL
    ML real time system
    Prediction
    server
    Demae-can
    server
    ML batch system

    View Slide

  49. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Data collection & Data ETL
    ML real time system
    Prediction
    server
    Demae-can
    server
    ML batch system

    View Slide

  50. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Data collection & Data ETL
    ML real time system
    Prediction
    server
    Demae-can
    server
    ML batch system

    View Slide

  51. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Data collection & Data ETL
    ML real time system
    Prediction
    server
    Demae-can
    server
    ML batch system

    View Slide

  52. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Demae-can DB
    (RDB)
    Data collection & Data ETL
    ML real time system
    Prediction
    server
    Demae-can
    server
    Hadoop cluster
    ML batch system

    View Slide

  53. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Demae-can DB
    (RDB)
    Data collection & Data ETL
    ML real time system
    ETL
    Prediction
    server
    Demae-can
    server
    Hadoop cluster
    ML batch system

    View Slide

  54. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Demae-can DB
    (RDB)
    Data collection & Data ETL
    ML real time system
    Feature
    loader
    ETL
    Prediction
    server
    Demae-can
    server
    Hadoop cluster
    ML batch system

    View Slide

  55. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Data collection & Data ETL
    ML real time system
    Feature
    loader
    ETL
    Prediction
    server
    Demae-can
    server
    Hadoop cluster
    ML batch system
    Data
    streaming
    (Kafka)

    View Slide

  56. Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Data collection & Data ETL
    ML real time system
    Feature
    loader
    ETL
    Streaming
    ETL server
    Prediction
    server
    Demae-can
    server
    Hadoop cluster
    ML batch system
    Data
    streaming
    (Kafka)

    View Slide

  57. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop

    View Slide

  58. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Order
    Order offer

    View Slide

  59. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Shop accept

    View Slide

  60. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Delivery offer

    View Slide

  61. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Driver accept

    View Slide

  62. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Arrive at shop

    View Slide

  63. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Pick up items at shop
    (driver)

    View Slide

  64. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Streaming data
    pick up items
    at shop
    Driver
    User
    Merchant / Shop
    Arrive at
    destination

    View Slide

  65. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Ex. The mean time to pick up items in the last 15 minutes in a
    certain area
    • Window aggregation (15 minutes)
    Streaming data
    pick up items
    at shop
    Streaming ETL

    View Slide

  66. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Ex. The mean time to pick up items in the last 15 minutes in a
    certain area
    • Window aggregation (15 minutes)
    • Extraction (area)
    Streaming data
    pick up items
    at shop
    Streaming ETL

    View Slide

  67. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Ex. The mean time to pick up items in the last 15 minutes in a
    certain area
    • Window aggregation (15 minutes)
    • Extraction (area)
    Streaming data sync
    • Time-series data is useful for analysis
    • Insert to Hadoop cluster (DWH)
    Streaming data
    pick up items
    at shop
    Streaming ETL

    View Slide

  68. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement
    Monitoring
    Model
    training
    Data
    collection
    Model
    verification
    Deployment
    Data
    ETL

    View Slide

  69. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Daily model update
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    ML batch system
    Feature
    loader
    ETL
    Demae-can
    server
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster

    View Slide

  70. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Daily model update
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    ML batch system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster

    View Slide

  71. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Daily model update
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    ML batch system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster

    View Slide

  72. MLFlow allows us to check when
    we created models and deployed
    them
    Daily model update

    View Slide

  73. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Demae-can ML components requirement
    Monitoring
    Model
    training Model
    verification
    Deployment
    Data
    collection Data
    ETL

    View Slide

  74. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Monitoring
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  75. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Monitoring
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  76. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Monitoring
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  77. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Monitoring
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  78. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Monitoring
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  79. Create real time features & offline features with latest data
    Record all the data related with prediction
    Create ML models with latest data
    Summary
    Monitoring
    Model
    training
    Data
    collection
    Model
    verification
    Deployment
    Data
    ETL

    View Slide

  80. Continuous improvement of
    ML products

    View Slide

  81. Contents
    delivery time (prediction data)
    delivery time (actual data)
    • This graph shows delivery time (prediction data and actual data) on a certain day

    View Slide

  82. Contents
    delivery time (prediction data)
    delivery time (actual data)
    • There was an issue occurring several times per month that caused prediction data
    to be much longer than actual data
    • This graph shows delivery time (prediction data and actual data) on a certain day

    View Slide

  83. Contents
    delivery time (prediction data)
    delivery time (actual data)
    • There was an issue occurring several times per month that caused prediction data
    to be much longer than actual data
    • This issue had a negative effect on drivers and users
    • We had to identify and handle this issue
    • This graph shows delivery time (prediction data and actual data) on a certain day

    View Slide

  84. The feedback loop occurred
    Item preparation
    time prediction
    Delivery
    offer
    • ML components (delivery offer & item preparation time prediction) affected each
    other

    View Slide

  85. The feedback loop occurred
    Item preparation
    time prediction
    Delivery
    offer
    • ML components (delivery offer & item preparation time prediction) affected each
    other
    Item pick up time (actual data)
    • Item pick up time (actual data) increased

    View Slide

  86. The feedback loop occurred
    Item preparation
    time prediction
    Delivery
    offer
    • ML components (delivery offer & item preparation time prediction) affected each
    other
    Item preparation prediction time
    • Item pick up time (actual data) increased
    • Item preparation prediction time increased
    Item pick up time (actual data)

    View Slide

  87. The feedback loop occurred
    Item preparation
    time prediction
    Delivery
    offer
    • ML components (delivery offer & item preparation time prediction) affected each
    other
    Item preparation prediction time
    • Item pick up time (actual data) increased
    • Item preparation prediction time increased
    • This feedback loop occurred between ML components
    Item pick up time (actual data)

    View Slide

  88. Item preparation time prediction
    order arrive at shop
    items ready arrive at destination
    item preparation time (a) travel time from shop to destination (c)
    delivery time (d)
    shop arrival time (b)
    d = max(a, b) + c
    Prediction

    View Slide

  89. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    pick up items
    at shop
    Item preparation time prediction
    • Use mean item pick up time in the last n
    minutes as a real time feature
    • When mean item pick up time increases,
    the item preparation prediction time
    increases
    Item pick up time

    View Slide

  90. driver
    merchant
    order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    pick up items
    at shop
    Delivery offer
    • Delivery offer timing depends on item
    preparation time and travel time

    View Slide

  91. driver
    merchant
    order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    pick up items
    at shop
    Travel time
    is 5 min
    Item preparation time
    is 15 min
    Delivery offer
    Delivery offer timing
    delays • Delivery offer timing depends on item
    preparation time and travel time

    View Slide

  92. driver
    merchant
    order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    pick up items
    at shop
    Travel time
    is 5 min
    Item preparation time
    is 15 min
    Delivery offer
    Delivery offer timing
    delays • Delivery offer timing depends on item
    preparation time and travel time
    • Deliver offer component uses item
    preparation prediction time
    • When the item preparation prediction
    time increases, delivery offer time delays

    View Slide

  93. What occurred ?
    Item preparation
    time prediction
    Delivery
    offer

    View Slide

  94. What occurred ?
    Item preparation
    time prediction
    Delivery
    offer
    1. Item pick up time (actual data) increased for some reason
    Item pick up time (actual data)

    View Slide

  95. What occurred ?
    Item preparation
    time prediction
    Delivery
    offer
    1. Item pick up time (actual data) increased for some reason
    2. Item preparation prediction time increased
    Item preparation prediction time
    Item pick up time (actual data)

    View Slide

  96. What occurred ?
    Item preparation
    time prediction
    Delivery
    offer
    1. Item pick up time (actual data) increased for some reason
    2. Item preparation prediction time increased
    3. Delivery offer timing delayed
    Item preparation prediction time
    Item pick up time (actual data)

    View Slide

  97. What occurred ?
    Item preparation
    time prediction
    Delivery
    offer
    1. Item pick up time (actual data) increased for some reason
    2. Item preparation prediction time increased
    3. Delivery offer timing delayed
    4. Item pick up time (actual data) increased
    Item preparation prediction time
    Item pick up time (actual data)

    View Slide

  98. What occurred ?
    Item preparation
    time prediction
    Delivery
    offer
    1. Item pick up time (actual data) increased for some reason
    2. Item preparation prediction time increased
    3. Delivery offer timing delayed
    4. Item pick up time (actual data) increased
    5. This feedback loop occurred, especially item preparation prediction time increased
    Item preparation prediction time
    Item pick up time (actual data)

    View Slide

  99. How did we
    identify this problem ?

    View Slide

  100. ML components affected each other
    The difficulty to identify this problem

    View Slide

  101. ML components affected each other
    We had to get the clue of this feedback loop
    The difficulty to identify this problem

    View Slide

  102. ML components affected each other
    The clue was the delay of delivery offer timing
    We had to get the clue of this feedback loop
    The difficulty to identify this problem

    View Slide

  103. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    The data that we used to identify this problem
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  104. 1. Divide delivery prediction time
    The process to identify this problem
    Contents
    Delivery time prediction
    Actual delivery time

    View Slide

  105. 1. Divide delivery prediction time & find the increase of item preparation prediction time
    The process to identify this problem
    Contents
    Delivery time prediction
    Actual delivery time

    View Slide

  106. 1. Divide delivery prediction time & find the increase of item preparation prediction time
    2. Check the model and features
    The process to identify this problem
    Contents
    Delivery time prediction
    Actual delivery time

    View Slide

  107. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Check the model and features
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    ML batch system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster

    View Slide

  108. Check the model and features
    Check the feature importance

    View Slide

  109. Check the model and features
    • Feature 12 is mean pick up time (real time feature / actual data)
    Check the feature importance
    Mean item pick up time (real time feature)

    View Slide

  110. Check the model and features
    • Feature 12 is mean pick up time (real time feature / actual data)
    Check the mean pick up time (real time feature / actual data)
    • Compared to item preparation time (prediction data) and both values increased
    Check the feature importance
    Contents
    Mean item pick up time (actual data)
    Mean item pick up time (real time feature)

    View Slide

  111. Check the model and features
    • Feature 12 is mean pick up time (real time feature / actual data)
    Check the mean pick up time (real time feature / actual data)
    • Compared to item preparation time (prediction data) and both values increased
    Check the feature importance
    Contents
    Item preparation time (prediction data)
    Contents
    Mean item pick up time (actual data)
    Mean item pick up time (real time feature)

    View Slide

  112. Check the model and features
    • Feature 12 is mean pick up time (real time feature / actual data)
    Check the mean pick up time (real time feature / actual data)
    • Compared to item preparation time (prediction data) and both values increased
    Check the feature importance
    Contents
    Item preparation time (prediction data)
    Contents
    Mean item pick up time (actual data)
    Mean item pick up time (real time feature)

    View Slide

  113. 1. Divide delivery prediction time & find the increase of item preparation prediction time
    2. Check the model and features & find the increase of item pick up time
    3. Divide item pick up time
    The process to identify this problem
    Contents
    Delivery time prediction
    Actual delivery time

    View Slide

  114. Data
    streaming
    (Kafka)
    Demae-can DB
    (RDB)
    Demae-can
    server
    Divide item pick up time
    Streaming
    ETL server
    Model
    training
    Prediction
    server
    ML real time system
    Feature
    loader
    ETL
    Demae-can
    server
    Model
    validation
    Model
    loader
    Real time
    features
    (Redis)
    Offline
    features
    (Redis)
    Hadoop cluster
    ML batch system

    View Slide

  115. order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Driver
    User
    Merchant / Shop

    View Slide

  116. order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Time from order to shop accept (actual data)
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Driver
    User
    Merchant / Shop
    Order
    Order offer
    Shop accept

    View Slide

  117. order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Time from shop accept to delivery offer (actual data)
    Time from order to shop accept (actual data)
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Driver
    User
    Merchant / Shop
    Delivery offer
    Shop accept

    View Slide

  118. order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Time from delivery offer to driver accept (actual data)
    Time from shop accept to delivery offer (actual data)
    Time from order to shop accept (actual data)
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Driver
    User
    Merchant / Shop
    Driver accept
    Delivery offer

    View Slide

  119. order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Time from driver accept to item pick up time (actual data)
    Time from delivery offer to driver accept (actual data)
    Time from shop accept to delivery offer (actual data)
    Time from order to shop accept (actual data)
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00
    Driver
    User
    Merchant / Shop
    Driver accept
    Arrive at shop
    Pick up items at shop
    (driver)

    View Slide

  120. Contents
    Time from order to shop accept (actual data)
    Time from shop accept to delivery offer (actual data)
    Time from delivery offer to driver accept (actual data)
    Time from driver accept to item pick up time(actual data)
    order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Time from driver accept to item pick up time (actual data)
    Time from delivery offer to driver accept (actual data)
    Time from shop accept to delivery offer (actual data)
    Time from order to shop accept (actual data)
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00

    View Slide

  121. Contents
    Time from order to shop accept (actual data)
    Time from shop accept to delivery offer (actual data)
    Time from delivery offer to driver accept (actual data)
    Time from driver accept to item pick up time(actual data)
    order
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    Time from driver accept to item pick up time (actual data)
    Time from delivery offer to driver accept (actual data)
    Time from shop accept to delivery offer (actual data)
    Time from order to shop accept (actual data)
    arrive
    at shop
    pick up items
    at shop
    Order id Geo id Status Time
    1 3 order 14:00:00
    1 3 shop accept 14:01:00
    1 3 delivery offer 14:03:00
    1 3 driver accept 14:05:00
    1 3 arrive at shop 14:15:00
    1 3 pick up items at shop 14:16:00
    1 3 arrive at destination 14:30:00

    View Slide

  122. driver
    merchant
    order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    pick up items
    at shop
    Pick up time
    is 5 min
    item preparation time
    is 15 min
    Delivery offer
    Wait for delivery offer
    • When the item preparation
    prediction time increases, delivery
    offer time delays

    View Slide

  123. This feedback loop occurred
    Item preparation
    time prediction
    Delivery
    offer
    Prepatation prediction time
    Item pick up time (actual data)

    View Slide

  124. How did we
    handle this problem ?

    View Slide

  125. order
    arrive
    at shop
    arrive
    at destination
    delivery
    offer
    shop
    accept
    driver
    accept
    pick up items
    at shop
    Item preparation time prediction
    • Decided not to use mean item pick up
    time in the last n minutes as a real time
    feature
    Item pick up time

    View Slide

  126. ML components are affected by many things that happened on Demae-can
    Summary

    View Slide

  127. ML components are affected by many things that happened on Demae-can
    Monitor & analyze the data and improve ML products
    Summary

    View Slide

  128. ML components are affected by many things that happened on Demae-can
    Have the perspective that overall system works well
    Monitor & analyze the data and improve ML components
    Summary

    View Slide

  129. Lastly

    View Slide

  130. What time is it ?
    Demae-can time

    View Slide

  131. Thank you

    View Slide