Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 62 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
3546266
Setting up GitHub Classroom Feedback
github-classroom[bot] Jan 31, 2024
66f5c55
[SETTING] Repo 셋업 진행 (#3)
warpfence Mar 3, 2024
d6d61e3
[Feat] #4 GiftHub backend 최초 생성 (#6)
warpfence Mar 3, 2024
9631d00
[SETTING] README 생성 (#7)
warpfence Mar 3, 2024
d79886a
Create python-package.yml
warpfence Mar 8, 2024
f0e0d0b
feat : add wdn_working, 1st_stage modeling
tldbs5026 Mar 9, 2024
4731ef0
feat siyun : replace wdn
tldbs5026 Mar 9, 2024
b5b542c
[Fix] feat siyun : fix Wide Deep model code
tldbs5026 Mar 10, 2024
81ada00
Delete .github/workflows/python-package.yml
warpfence Mar 11, 2024
e31ea84
feat siyun : fix lgbm logic
tldbs5026 Mar 14, 2024
75b0f78
[Feat] #17 MLflow 서버 세팅 (#18)
warpfence Mar 14, 2024
16d7967
[Feat] #19 frontend 프로토타입
llseungjun Mar 15, 2024
65f92ed
Feat siyun : add lightgcn
tldbs5026 Mar 16, 2024
136e043
Merge branch 'develop_siyun' of https://github.com/boostcampaitech6/l…
tldbs5026 Mar 16, 2024
d89bf8f
[Feat] #23 EASE 모듈화 코드 추가
llseungjun Mar 18, 2024
e81ca2d
feat siyun : add main.py for lightgcn
tldbs5026 Mar 18, 2024
bb2ddff
feat siyun : add readme.md
tldbs5026 Mar 18, 2024
5ac710d
feat siyun : add modeling.py
tldbs5026 Mar 18, 2024
ed04dc7
feat siyun : add recommend.py
tldbs5026 Mar 18, 2024
c6be0be
feat siyun : add train.py
tldbs5026 Mar 18, 2024
aa36547
feat siyun : add preprocessing.py
tldbs5026 Mar 18, 2024
e8f2263
[Feat] add lgbm
gunwoof Mar 19, 2024
06b929a
[Update] .gitignore pkl 추가
gunwoof Mar 19, 2024
6b55799
[Feat] BERT 모델 추가
warpfence Mar 19, 2024
99c2899
[Refactor] #24 frontend inference 구조 변경
llseungjun Mar 19, 2024
32d650a
feat siyun : add recommend user function
tldbs5026 Mar 19, 2024
bef1f31
feat siyun : add lightgcn codes for user rec
tldbs5026 Mar 19, 2024
ff220cd
[Chore] EASE 주피터 파일 업로드
llseungjun Mar 20, 2024
1a53ea0
[Fix] Inference 페이지 LGBM 추천 결과 동시에 바인딩
llseungjun Mar 21, 2024
e03c602
[Remove] LoginView.vue 삭제
llseungjun Mar 21, 2024
7e9f65c
[Feat] #27 frontend dockerfile 생성
llseungjun Mar 21, 2024
6fe286d
[Fix] router 설정에서 loginview 제거
llseungjun Mar 21, 2024
560f827
[Feat] #26 inference 페이지 좋아요 표시 추가, 데이터 바인딩 전 로딩 표시 추가
llseungjun Mar 23, 2024
49f3f37
[Chore] situation 페이지 상황별 이미지 추가
llseungjun Mar 23, 2024
0da3a43
[Design] main 페이지 디자인 수정
llseungjun Mar 23, 2024
1eec6c1
[Design] inference 페이지 유저 인터렉션 하트에서 체크박스로 변경
llseungjun Mar 23, 2024
adf6b20
[Feat] mlflow 배포 파일 추가 (#29)
warpfence Mar 24, 2024
c6ff2ce
[Design] #26 전체 디자인 템플릿 변경
llseungjun Mar 25, 2024
3c62107
Update README.md
warpfence Mar 26, 2024
64ec875
[Design] #26 inference 페이지 전체 디자인 변경
llseungjun Mar 26, 2024
2740671
[Setting] Github README 수정 반영 (#31)
warpfence Mar 27, 2024
61402c6
[Feat] 백엔드 서버 main 브랜치 Pull Request (#32)
warpfence Mar 27, 2024
73eaebb
[Feat] 서버 배포를 위한 프록시 설정
llseungjun Mar 27, 2024
5a32cc9
[SETTING] 백엔드 README.md 추가
warpfence Mar 27, 2024
51e0123
[SETTING] FastAPI README.md 추가
warpfence Mar 27, 2024
badb66b
[update] siyun : delete old versions
tldbs5026 Mar 27, 2024
5d8835e
[chore] siyun : update 1st stage model structure
tldbs5026 Mar 27, 2024
a19e8cd
[update] siyun : update bert4rec
tldbs5026 Mar 27, 2024
b42a641
[update] siyun : move 2nd stage folder and update EASE code
tldbs5026 Mar 27, 2024
19ba3f0
[update] siyun : update lightgcn
tldbs5026 Mar 27, 2024
9882972
[chore] siyun : wdn experiment result
tldbs5026 Mar 27, 2024
018b20a
[update] siyun : update recbole settings for CF mode
tldbs5026 Mar 27, 2024
4ebe5ad
[update] siyun : update readme.md
tldbs5026 Mar 27, 2024
c25c597
[update] siyun : delete old backend versions
tldbs5026 Mar 27, 2024
d868494
[Fix] nginx 프록시 설정 관련 버그 수정
llseungjun Mar 27, 2024
1fe755d
Delete modeling/readme.md
tldbs5026 Mar 28, 2024
95f32a2
[Fix] favicon, 페이지 타이틀 추가
llseungjun Apr 1, 2024
2b17947
[SETTING] README 수정 반영 (#34)
warpfence Apr 2, 2024
5e556b0
Merge branch 'main' into branch_for_model_merging
tldbs5026 Apr 2, 2024
9ef944f
Merge pull request #33 from boostcampaitech6/branch_for_model_merging
tldbs5026 Apr 2, 2024
d227c9c
Merge pull request #35 from boostcampaitech6/develop_frontend
llseungjun Apr 3, 2024
1a0c658
Update README.md
chanwoomoon Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Bug Report
about: 버그를 레포트 할 때 사용하는 템플릿
title: "[BUG] "
labels: ""
assignees: ""

---

## Describe the bug
-

## To Reproduce
-

## Expected behavier
-

## Screenshots
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Request
about: 기능을 추가할 때 사용하는 템플릿
title: "[FEAT] "
labels: ""
assignees: ""

---

## Background
-

## To Do
- [ ] To do 1
- [ ] To do 2
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Overview
-

## Change Log
-

## To Reviewer
-

## Issue Tags
- Closed: #
- See also: #
49 changes: 49 additions & 0 deletions .github/workflows/backend-gitaction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: backend

on:
push:
branches: [ "develop_backend" ]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd GiftHub_backend
pip install -r requirements.txt
- name: Test Backend Django Excecution
run: |
cd GiftHub_backend
python manage.py test

deploy:
# needs를 통해 build job이 수행 성공시에 작업되도록 설정
needs: build
runs-on: ubuntu-20.04

steps:
# NCP 로그인 / git pull & Docker run
- name: NCP login and git pull and docker run
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.BACKEND_HOST }}
username: ${{ secrets.BACKEND_USERNAME }}
password: ${{ secrets.BACKEND_PASSWORD }}
port: ${{ secrets.BACKEND_PORT }}
script: |
cd ${{ secrets.BACKEND_DIR_PATH }}
git checkout develop_backend
git pull
bash deploy.sh
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.pyc
*.sqlite3
*.json
*.pt
*.pkl
__pycache__
GiftHub_mlflow/mlruns
GiftHub_mlflow/mlflow_pyfunc_custom
GiftHub_mlflow/mlartifacts
9 changes: 9 additions & 0 deletions GiftHub_backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.9.18
# set unbuffered mode
ENV PYTHONUNBUFFERD 1
COPY . /home/GiftHub_backend
WORKDIR /home/GiftHub_backend
# RUN sed -i "s/DEBUG = True/DEBUG = False/g" /home/ksh/level2-3-recsys-finalproject-recsys-04/GiftHub_backend/GiftHubProject/settings.py
RUN pip install -r requirements.txt
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
EXPOSE 8000
6 changes: 6 additions & 0 deletions GiftHub_backend/GiftHubApp/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.contrib import admin
from GiftHubApp.database.models import *

# Register your models here.
admin.site.register(Temp02)
admin.site.register(User)
Empty file.
69 changes: 69 additions & 0 deletions GiftHub_backend/GiftHubApp/api/requests/model_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import pandas as pd
from django.conf import settings

from GiftHubApp.database.sql_executor import *
from GiftHubApp.database.serializers import *
from GiftHubApp.database.models import *
from GiftHubApp.api.requests.request import APIRequest

# mlflow naver serving
def predict_lgbm(product_id: str):
queryset = FilteredRawdata.objects
serializer = FilteredRawdataSerializer(queryset, many=True)
df = pd.DataFrame.from_dict(serializer.data)
df = df.drop("id", axis=1) # id 제외

api = APIRequest()
columns = list(df.columns)
data = list(df.loc[:].values.tolist())
params = {
"columns":columns,
"rows":data,
"product_id":product_id
}
api.set_data(params)
api.set_url(settings.MODEL_SERVING_URL + settings.LGBM_SLASH)
predictions = api.post()
predictions = pd.DataFrame(predictions["rows"], columns=predictions["columns"])

return predictions

# amazon product serving
def predict_bert4rec(list_product_id: list):
api = APIRequest()
params = {
"matrix":list_product_id
}
api.set_data(params)
api.set_url(settings.MODEL_SERVING_URL + settings.BERT4REC_SLASH)
predictions = api.post()
predictions = predictions["list"]

return predictions

def predict_ease(df_user_interaction: pd.DataFrame):
api = APIRequest()
columns = list(df_user_interaction.columns)
data = list(df_user_interaction.loc[:].values.tolist())
params = {
"columns":columns,
"rows":data
}
api.set_data(params)
api.set_url(settings.MODEL_SERVING_URL + settings.EASE_SLASH)
predictions = api.post()
predictions = predictions["list"]

return predictions

def predict_lightgcn(list_product_id: list):
api = APIRequest()
params = {
"matrix":list_product_id
}
api.set_data(params)
api.set_url(settings.MODEL_SERVING_URL + settings.LGCN_SLASH)
predictions = api.post()
predictions = predictions["list"]

return predictions
48 changes: 48 additions & 0 deletions GiftHub_backend/GiftHubApp/api/requests/request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import os
import requests

class APIRequest():
def __init__(self):
self.headers = {'Content-Type': 'application/json'}
self.url = ""
self.params = {}
self.data = {}

def set_url(self, url: str):
if not isinstance(url, str):
raise TypeError("Provided value is not of type str.")
self.url = url

def set_params(self, params: dict):
"""
Use get
"""
if not isinstance(params, dict):
raise TypeError("Provided value is not of type dict.")
self.params = params

def set_data(self, data: dict):
"""
Use post
"""
if not isinstance(data, dict):
raise TypeError("Provided value is not of type dict.")
self.data = data

def get(self):
response = requests.get(self.url, params=self.params)
if response.status_code == 200:
# 요청 성공
return response.json() # 응답 데이터 처리
else:
# 요청 실패
raise response.json()

def post(self):
response = requests.post(self.url, json=self.data, headers=self.headers)
if response.status_code == 200:
# 요청 성공
return response.json() # 응답 데이터 처리
else:
# 요청 실패
raise response.json()
Empty file.
Loading