Skip to content

ehddnr301/MovieRecommend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Movie Recommend

Scenario

  • ๋‹น์‹ ์€ MovieFlix ์˜ ํ•˜๋‚˜๋ฟ์ธ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • ์œ ์ €๋“ค์˜ ์›ํ™œํ•œ ์˜ํ™”๊ด€๋žŒ์„ ์œ„ํ•ด ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ๊ณผ ์ถ”์ฒœ์‹œ์Šคํ…œ ๊ฐœ๋ฐœ์„ ์ง„ํ–‰ํ•˜์—ฌ์•ผํ•ฉ๋‹ˆ๋‹ค.
  • ์šฐ๋ฆฌ๋Š” A/B Test์—๋งŒ ์ง‘์ค‘ํ• ๋ฟ A/A Test๋Š” ๋†“์น˜๊ธฐ ์‰ฝ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
  • ํ•˜์—ฌ MovieFlix๋Š” A/B Test๋ฅผ ํ†ตํ•ด ๋Œ€์กฐ ์‹คํ—˜์„ ํ•˜๊ธฐ์ „ A/A Test๋ฅผ ํ†ตํ•ด ๋‘๊ทธ๋ฃน์„ ๋จผ์ € ์‚ดํŽด๋ณด๋ ค ํ•ฉ๋‹ˆ๋‹ค.
    • ์ด๋ฒˆ ํ”„๋กœ์ ํŠธ๋Š” ๋ฐฉํƒœ๋ชจ๋‹˜์˜ ๋ฐ์ดํ„ฐ์•ผ ๋†€์ž ๋ฐœํ‘œ์— ์˜๊ฐ์„ ๋ฐ›์•„ ์ œ์ž‘ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

Architecture

Final Visualization

  • ๊ทธ๋ฃน๋ณ„ ํ‰๊ท  ๋งŒ์กฑ๋„ ์ ์ˆ˜ ์ฐจํŠธ ํ˜น์€ ์œ ์ € ๋งŒ์กฑ๋„ ํ˜„ํ™ฉ ์ฐจํŠธ๋ฅผ ๋ณด์•˜์„ ๋•Œ A/B Test์—์„œ B๊ทธ๋ฃน ๋งŒ์กฑ๋„๊ฐ€ ๊ฐœ์„ 
  • ์šฐ๋ฆฌ์˜ ์ถ”์ฒœ์‹œ์Šคํ…œ์ด, ์„œ๋น„์Šค๊ฐ€ ์ž˜ ์ž‘๋™ํ•˜๊ณ  ์žˆ๊ตฌ๋‚˜๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋ง

Infra

  • Infra
  • VM๊ด€๋ฆฌ ๋ฐ ๊ฐœ๋ฐœํ™˜๊ฒฝ๊ด€๋ฆฌ๋ฅผ terraform๊ณผ ansible์„ ํ†ตํ•ด ํ•˜๊ฒŒ๋ฉ๋‹ˆ๋‹ค.

K8s

  • K8s
  • ์‚ฌ์šฉ๋˜๋Š” ๋ชจ๋“  App๋“ค์„ kubernetes์œ„์—์„œ ๊ด€๋ฆฌํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

Client

  • project/client
  • ์œ ์ € ํ–‰๋™๋ถ€๋ถ„์„ ๋‹ด๋‹นํ•˜๋Š” ์ฝ”๋“œ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.
  • ๊ฐ€์ƒ์˜ ์‹œ๋‚˜๋ฆฌ์˜ค๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.
        1. ์˜ํ™”๊ฐ€ ๊ฐœ๋ด‰ (send_movie_data = Movie ๋ฐ์ดํ„ฐ ์ƒ์„ฑ)
        2. ์•ž์„œ 1์—์„œ ๊ฐœ๋ด‰ํ•œ ์˜ํ™”๋ฅผ ๋ณด๋Ÿฌ ์‚ฌ๋žŒ๋“ค์ด ๋ฐฉ๋ฌธ
            2-1. ratings.csv์— ํ•ด๋‹น movie_id๊ฐ€ ์กด์žฌํ•˜๋Š” ์œ ์ € ์ถ”์ถœ (find_user_list_from_ratings)
            2-2. ํ•ด๋‹น ์œ ์ €๋“ค์— ํ•œํ•˜์—ฌ ratings ๋ฐ์ดํ„ฐ์™€ feedbacks ๋ฐ์ดํ„ฐ ์ƒ์„ฑ (send_user_reaction)
    

FastAPI

  • project/fastapi
  • ๋ฐฑ์—”๋“œ ์„œ๋น„์Šค๋ฅผ ๋‹ด๋‹นํ•˜๋Š” ์ฝ”๋“œ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.
  • Client ์ฝ”๋“œ์—์„œ ์ƒ์„ฑ๋˜๋Š” Request๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • Feedback๋ฐ์ดํ„ฐ๋ฅผ ํ†ตํ•ด ํ˜„์žฌ ์„œ๋น„์Šค ๋งŒ์กฑ๋„๋กค ํ‰๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
    • 9๊ฐœ์˜ ์˜ํ™”๋ฅผ ์ถ”์ฒœํ•ด ์œ ์ €๊ฐ€ ์ด๋ฒˆ์— ๋ณด๋ ค๋Š” ์˜ํ™”๊ฐ€ ์•ž์ชฝ์— ์œ„์น˜ํ• ์ˆ˜๋ก ์ ์ˆ˜๊ฐ€ ๋†’๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

Kafka

  • project/kafka
  • Lambda Data Architecture์—์„œ Speed Layer ๋ถ€๋ถ„์„ Kafka Connector๋ฅผ ํ†ตํ•ด ๊ตฌํ˜„ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

Airflow

  • Airflow-Dags
  • Lambda Data Architecture์—์„œ Batch Layer ๋ถ€๋ถ„์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ Dag์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.
  • jsonํŒŒ์ผ์„ ํ†ตํ•ด ๋™์ ์œผ๋กœ Dag์„ ์ƒ์„ฑํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
  • git-sync๋ฅผ ํ†ตํ•ด ์œ„ repository์— ์ •์˜๋œ Dag์„ ์‚ฌ์šฉํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
  • ๊ฐ„๋‹จํ•œ ๋จธ์‹ ๋Ÿฌ๋‹ Dag๋„ ๋‹ด๊ฒจ์žˆ์Šต๋‹ˆ๋‹ค.

Grafana

  • ์‹œ๊ฐํ™” ์šฉ๋„๋กœ ์‚ฌ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

MLFlow

  • ๋ชจ๋ธ Registry ์šฉ๋„๋กœ ์‚ฌ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Minio

  • MLflow์˜ ์•„ํ‹ฐํŒฉํŠธ ์Šคํ† ๋ฆฌ์ง€๋ฅผ ์œ„ํ•ด ์‚ฌ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

About

๐Ÿš€ Recommend Movie MLOps System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages