본문 바로가기

MLOps

(4)
[FastAPI] 경로 매개변수, 쿼리 매개변수 경로 매개변수 경로 매개변수(Path Parameters)는 흔히 우리가 말하는 URL 경로에 들어가는 변수를 의미한다. 아래의 예제에서 user_id가 경로 매개변수이다. from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}") def get_user(user_id: int): # 타입 힌트 int return {"user_id": user_id} http 통신은 타입 없이 전부 문자열로만 통신한다. 따라서 타입힌트를 넣어준다. 정수형 타입이 아닌 값을 호출하면, 다음과 같이 응답코드 422와 함께 위와 같은 오류 메시지가 나타난다. $ http :8000/users/12.3 HTTP/1.1 422 Unprocessable Ent..
[BentoML] BentoML 소개 및 사용법 0. Reference 1. BentoML 1.1 Introduction 1.2 BentoML 소개 BentoML이 해결하는 문제 문제 1: Model Serving Infra의 어려움 문제 2: Online Serving의 Monitoring 및 Error Handling 문제 3: Online Serving 퍼포먼스 튜닝의 어려움 1.3 BentoML 특징 2. BentoML 설치 및 사용법 2.1. BentoML 설치 2.2 BentoML 사용 Flow 모델 학습 코드 생성 Prediction Service Class 생성 Prediction Service 저장(Pack) Serving Docker Image Build 0. Reference Naver boostcamp - Product Servi..
[mlflow] conda 가상환경에서 mlflow 실행하기 codna 환경에서 mlflow run을 하니까 이런 에러가 뜬다 conda install pyenv=3.7.0 conda 에 pyenv를 버전 맞춰서 깔아준다 pip install mlflow mlflow도 다시 깔아준다 다시 mlflow run을 했더니 모듈을 찾을 수 없다고 한다 분명 pip list에 잘 깔려 있는뒙?... conda env export > environment.yaml conda 가상환경을 yaml 파일로 복제한 뒤 만들어둔 mlflow 실행파일에 conda_env: enviroment.yaml 를 추가해주고 다시 실행하면 잘돌아간다 그래도 안된다면 가상환경 밀고 다시깔기
[mlflow] mlflow experiments list 이란? mlflow experiments 확인하는 법 mlflow experiments create --experiment-name 이름 mlflow에서 experiments 생성 experiments 확인하려는데 list라는 command가 없다 mlflow experiments --help help로 찾아본다 mlflow experiments search 찾았다 experiments를 만든 적이 있는 경우 search가 없다고 한다 다시 help로 찾아보니 list가 있다 정리 처음 만들 때 mlflow experiments search 만든 적 있을 때 mlflow experiments list