# Thinking Machines: Running Dagster for Machine Learning Pipelines in Production

**URL:** https://discuss.dataengineercafe.io/t/thinking-machines-running-dagster-for-machine-learning-pipelines-in-production/308
**Category:** Dagster
**Tags:** dagster, machine-learning, thinking-machines
**Created:** [June 23, 2022, 11:10am UTC](https://discuss.dataengineercafe.io/t/thinking-machines-running-dagster-for-machine-learning-pipelines-in-production/308 "2022-06-23T11:10:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zkan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dataengineercafe.io/zkan/32/2_2.png) [@zkan](https://discuss.dataengineercafe.io/u/zkan)
#### Post date: [June 23, 2022, 11:10am UTC](https://discuss.dataengineercafe.io/t/thinking-machines-running-dagster-for-machine-learning-pipelines-in-production/308/1 "2022-06-23T11:10:33Z")

</div>

อยู่ว่าง ๆ ช่วงเย็น ๆ ลองนั่งดูชาวบ้านสร้าง ML pipeline ใน Dagster เล่น รอบนี้ไปดูของ [Thinking Machines](https://thinkingmachin.es/) มา เค้าเอาไปใช้สร้างโมเดล ML กับ Smart Unified Search

[![](https://canada1.discourse-cdn.com/flex035/uploads/dataengineercafe/original/1X/753dd9da61bac2d4ad50469da5221f2fc6aab967.jpeg "Thinking Machines: Running Dagster for Machine Learning Pipelines in Production") ](https://www.youtube.com/watch?v=VviaQYVE4Qg)

หน้าตา ML pipeline ของเค้าประมาณนี้

 ![TM's ML automation workflow](https://canada1.discourse-cdn.com/flex035/uploads/dataengineercafe/original/1X/fa2456c9511405b49f2b5a8e53c2449b27ee4914.jpeg)

พอเขียนโค้ดใน notebook เสร็จ ก็จับเข้าใส่ Dagster เลย ดูแล้วเป็นท่าปกติที่ทำกันทั่วไป train model แล้วเอา metadata ใส่ asset เพื่อเอาไป debug ต่อได้ง่ายบนหน้า Dagit

 ![Porting notebook code to Dagster](https://canada1.discourse-cdn.com/flex035/uploads/dataengineercafe/original/1X/2f3448907bf027ecf63cb114e239e330f1704732.jpeg)

แต่อันนี้ดู ๆ แล้ว ถ้าโค้ดเขียนไม่ดี หรือว่าไม่มี test กันไว้เลยนี่น่ากลัวอยู่นะ… เดาว่าทีม data scientist ของเค้าน่าจะเขียนโค้ดโอเคในระดับหนึ่ง 😅

แล้วก็ที่น่าสนใจก็คือเค้าใช้ Repositories จัดการ pipelines ต่าง ๆ ไม่ให้มาตบตีกัน

 ![Dagster Repos to organize pipelines](https://canada1.discourse-cdn.com/flex035/uploads/dataengineercafe/original/1X/d496c5b6fff16bf8f1283fc51c53d78bb153dbad.jpeg)

ที่เหลือก็ดูดี น่าสนใจ มี notification เพื่อ monitor เรื่องต่าง ๆ หรือมีการใช้ pipeline อีกตัวหนึ่งเพื่อเอามา monitor ค่า success rate หรือทำพวก health check

สรุปแล้ว สนุกดีที่ได้ดูว่าชาวบ้านเค้าเอา Dagster ไปใช้ใน use case ไหนบ้าง

---

<div class="post-metadata">

### Author: ![kahnwong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dataengineercafe.io/kahnwong/32/295_2.png) [@kahnwong](https://discuss.dataengineercafe.io/u/kahnwong)
#### Post date: [June 23, 2022, 3:46pm UTC](https://discuss.dataengineercafe.io/t/thinking-machines-running-dagster-for-machine-learning-pipelines-in-production/308/2 "2022-06-23T15:46:23Z")

</div>

> [@zkan](#):
>
> มีการใช้ pipeline อีกตัวหนึ่งเพื่อเอามา monitor ค่า success rate หรือทำพวก health check

อุ๊ย รู้ได้ไงว่าเราก็ทำท่านี้ 5555  
ปกติจะทำ task เอาไว้อันนึง เป็น sensor วิ่งทุกๆ 30 seconds เอาไว้คอย poll task status ว่าพังหรือร่วง แล้วส่งไปที่ discord
