การสร้าง API

MLOps Deployment and Life Cycling

Nemanja Radojkovic

Senior Machine Learning Engineer

API ระดับสูงสุด

MLOps Deployment and Life Cycling

นิยาม API

MLOps Deployment and Life Cycling

เซิร์ฟเวอร์

MLOps Deployment and Life Cycling

ไคลเอนต์

MLOps Deployment and Life Cycling

บริการให้ไคลเอนต์

รันโพรซีเดอร์บนเซิร์ฟเวอร์ของเรา

ตัวอย่าง: Sentiment analysis API ของ Amazon Comprehend

โลโก้ Amazon Comprehend

เข้าถึงฐานข้อมูลระยะไกล

ตัวอย่าง: Twitter API, New York Times API

โลโก้ Twitter API

MLOps Deployment and Life Cycling

สถาปัตยกรรม API

 

  1. REST: REpresentational State Transfer
  2. RPC: Remote Procedure Call
  3. SOAP: Simple Object Access Protocol

 

ในคอร์สนี้: มุมมองที่ไม่ขึ้นกับสถาปัตยกรรมใดเป็นพิเศษ

MLOps Deployment and Life Cycling

ตัวอย่าง: แอปนำทาง

แอปนำทาง

 

 

 

จุดประสงค์ของ API: ให้แอปไคลเอนต์คำนวณเวลาถึงโดยประมาณได้

1 Image: Pixabay, https://www.stockvault.net/user/profile/161904
MLOps Deployment and Life Cycling

API รูปแบบง่ายที่สุด

MLOps Deployment and Life Cycling

API เรียบง่าย 2

MLOps Deployment and Life Cycling

โมเดลกำลังทำงาน

MLOps Deployment and Life Cycling

การตอบสนองของโมเดล

MLOps Deployment and Life Cycling

ข้อผิดพลาดของเซิร์ฟเวอร์

MLOps Deployment and Life Cycling

MLOps Deployment and Life Cycling

MLOps Deployment and Life Cycling

การตรวจสอบอินพุต

MLOps Deployment and Life Cycling

การตรวจสอบอินพุต - สิ่งที่คาดหวัง

MLOps Deployment and Life Cycling

การตรวจสอบอินพุต 3

MLOps Deployment and Life Cycling

ข้อความแจ้งผลการตรวจสอบอินพุต

MLOps Deployment and Life Cycling

โมเดลคำขอ

MLOps Deployment and Life Cycling

การตรวจสอบเอาต์พุต

MLOps Deployment and Life Cycling

บักในโค้ด

MLOps Deployment and Life Cycling

ไคลเอนต์ล่ม

MLOps Deployment and Life Cycling

โมเดลการตอบสนอง

MLOps Deployment and Life Cycling

การตรวจสอบเอาต์พุต - ข้อความแสดงข้อผิดพลาดที่เข้าใจได้

MLOps Deployment and Life Cycling

กำหนดสิ่งที่คาดหวังไว้แล้ว

MLOps Deployment and Life Cycling

การยืนยันตัวตนและการจำกัดอัตรา

MLOps Deployment and Life Cycling

การยืนยันตัวตน

MLOps Deployment and Life Cycling

การจำกัดอัตราการใช้งาน

MLOps Deployment and Life Cycling

FastAPI

  • เฟรมเวิร์ก API แบบโอเพนซอร์สสำหรับ Python
  • ครบทุกฟีเจอร์สำคัญพร้อมใช้งานทันที
  • สร้างและเปิดตัว REST API ได้อย่างรวดเร็ว
1 https://fastapi.tiangolo.com
MLOps Deployment and Life Cycling

มาฝึกกันเถอะ!

MLOps Deployment and Life Cycling

Preparing Video For Download...