diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index ad50c51b..54d1ab1a 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -2,6 +2,8 @@ name: CI (Python/FastAPI) on: push: + branches: + - feature/onnx tags: - 'pre-processing-v*' pull_request: diff --git a/apps/pre-processing-service/app/service/similarity_service.py b/apps/pre-processing-service/app/service/similarity_service.py index 0e245da1..dbd2b762 100644 --- a/apps/pre-processing-service/app/service/similarity_service.py +++ b/apps/pre-processing-service/app/service/similarity_service.py @@ -1,177 +1,177 @@ -# from app.utils.similarity_analyzer import SimilarityAnalyzer -# from app.errors.CustomException import InvalidItemDataException -# from ..model.schemas import RequestSadaguSimilarity -# from loguru import logger -# -# -# class SimilarityService: -# def __init__(self): -# pass -# -# def select_product_by_similarity(self, request: RequestSadaguSimilarity) -> dict: -# """ -# BERT 기반 유사도 분석 후 상품 선택 - 4단계 -# """ -# keyword = request.keyword -# candidates = request.matched_products -# fallback_products = request.search_results or [] -# -# logger.info( -# f"유사도 분석 서비스 시작: job_id={request.job_id}, keyword='{keyword}', matched_count={len(candidates) if candidates else 0}, fallback_count={len(fallback_products)}" -# ) -# -# # 매칭된 상품이 없으면 전체 검색 결과로 폴백 -# if not candidates: -# if not fallback_products: -# logger.warning( -# f"매칭된 상품과 검색 결과가 모두 없음: keyword='{keyword}'" -# ) -# return { -# "job_id": request.job_id, -# "schedule_id": request.schedule_id, -# "schedule_his_id": request.schedule_his_id, -# "keyword": keyword, -# "selected_product": None, -# "reason": "매칭된 상품과 검색 결과가 모두 없음", -# "status": "success", -# } -# -# logger.info("매칭된 상품 없음 → 전체 검색 결과에서 유사도 분석") -# candidates = fallback_products -# analysis_mode = "fallback_similarity_only" -# else: -# analysis_mode = "matched_products" -# -# try: -# analyzer = SimilarityAnalyzer() -# -# logger.info( -# f"키워드 '{keyword}'와 {len(candidates)}개 상품의 유사도 분석 시작... (모드: {analysis_mode})" -# ) -# -# # 한 개만 있으면 바로 선택 -# if len(candidates) == 1: -# selected_product = candidates[0] -# -# logger.info("단일 후보 상품 - 유사도 검증 진행") -# # 유사도 계산 -# similarity = analyzer.calculate_similarity( -# keyword, selected_product["title"] -# ) -# -# # 폴백 모드에서는 임계값 검증 -# if analysis_mode == "fallback_similarity_only": -# similarity_threshold = 0.3 -# if similarity < similarity_threshold: -# logger.warning( -# f"단일 상품 유사도 미달: similarity={similarity:.4f} < threshold={similarity_threshold}" -# ) -# return { -# "job_id": request.job_id, -# "schedule_id": request.schedule_id, -# "schedule_his_id": request.schedule_his_id, -# "keyword": keyword, -# "selected_product": None, -# "reason": f"단일 상품 유사도({similarity:.4f}) < 기준({similarity_threshold})", -# "status": "success", -# } -# -# selected_product["similarity_info"] = { -# "similarity_score": float(similarity), -# "analysis_type": "single_candidate", -# "analysis_mode": analysis_mode, -# } -# -# logger.success( -# f"단일 상품 선택 완료: title='{selected_product['title'][:30]}', similarity={similarity:.4f}" -# ) -# -# return { -# "job_id": request.job_id, -# "schedule_id": request.schedule_id, -# "schedule_his_id": request.schedule_his_id, -# "keyword": keyword, -# "selected_product": selected_product, -# "reason": f"단일 상품 - 유사도: {similarity:.4f} ({analysis_mode})", -# "status": "success", -# } -# -# # 여러 개가 있으면 유사도 비교 -# logger.info("여러 상품 중 최고 유사도로 선택...") -# -# # 제목만 추출해서 배치 분석 -# titles = [product["title"] for product in candidates] -# similarity_results = analyzer.analyze_similarity_batch(keyword, titles) -# -# # 결과 출력 -# logger.info("유사도 분석 결과:") -# for i, result in enumerate(similarity_results[:5]): # 상위 5개만 로그 -# logger.info( -# f" {i+1}위: {result['title'][:40]} | 유사도: {result['similarity']:.4f}" -# ) -# -# # 최고 유사도 선택 -# best_result = similarity_results[0] -# selected_product = candidates[best_result["index"]].copy() -# -# # 폴백 모드에서는 임계값 검증 -# similarity_threshold = 0.3 -# if ( -# analysis_mode == "fallback_similarity_only" -# and best_result["similarity"] < similarity_threshold -# ): -# logger.warning( -# f"최고 유사도 미달: similarity={best_result['similarity']:.4f} < threshold={similarity_threshold}" -# ) -# return { -# "job_id": request.job_id, -# "schedule_id": request.schedule_id, -# "schedule_his_id": request.schedule_his_id, -# "keyword": keyword, -# "selected_product": None, -# "reason": f"최고 유사도({best_result['similarity']:.4f}) < 기준({similarity_threshold})", -# "status": "success", -# } -# -# # 유사도 정보 추가 -# selected_product["similarity_info"] = { -# "similarity_score": best_result["similarity"], -# "analysis_type": "multi_candidate_bert", -# "analysis_mode": analysis_mode, -# "rank": 1, -# "total_candidates": len(candidates), -# } -# -# # 매칭 모드에서는 종합 점수도 계산 -# if analysis_mode == "matched_products" and "match_info" in selected_product: -# match_score = selected_product["match_info"]["match_score"] -# similarity_score = best_result["similarity"] -# # 가중치: 매칭 40%, 유사도 60% -# final_score = match_score * 0.4 + similarity_score * 0.6 -# selected_product["final_score"] = final_score -# reason = f"종합점수({final_score:.4f}) = 매칭({match_score:.4f})*0.4 + 유사도({similarity_score:.4f})*0.6" -# logger.info( -# f"종합 점수 계산: match_score={match_score:.4f}, similarity_score={similarity_score:.4f}, final_score={final_score:.4f}" -# ) -# else: -# reason = f"유사도({best_result['similarity']:.4f}) 기준 선택 ({analysis_mode})" -# -# logger.success( -# f"상품 선택 완료: title='{selected_product['title'][:30]}', {reason}" -# ) -# -# return { -# "job_id": request.job_id, -# "schedule_id": request.schedule_id, -# "schedule_his_id": request.schedule_his_id, -# "keyword": keyword, -# "selected_product": selected_product, -# "reason": reason, -# "status": "success", -# } -# -# except Exception as e: -# logger.error( -# f"유사도 분석 서비스 오류: job_id={request.job_id}, keyword='{keyword}', error='{e}'" -# ) -# raise InvalidItemDataException() +from app.utils.similarity_analyzer import SimilarityAnalyzerONNX +from app.errors.CustomException import InvalidItemDataException +from ..model.schemas import RequestSadaguSimilarity +from loguru import logger + + +class SimilarityService: + def __init__(self): + pass + + def select_product_by_similarity(self, request: RequestSadaguSimilarity) -> dict: + """ + BERT 기반 유사도 분석 후 상품 선택 - 4단계 + """ + keyword = request.keyword + candidates = request.matched_products + fallback_products = request.search_results or [] + + logger.info( + f"유사도 분석 서비스 시작: job_id={request.job_id}, keyword='{keyword}', matched_count={len(candidates) if candidates else 0}, fallback_count={len(fallback_products)}" + ) + + # 매칭된 상품이 없으면 전체 검색 결과로 폴백 + if not candidates: + if not fallback_products: + logger.warning( + f"매칭된 상품과 검색 결과가 모두 없음: keyword='{keyword}'" + ) + return { + "job_id": request.job_id, + "schedule_id": request.schedule_id, + "schedule_his_id": request.schedule_his_id, + "keyword": keyword, + "selected_product": None, + "reason": "매칭된 상품과 검색 결과가 모두 없음", + "status": "success", + } + + logger.info("매칭된 상품 없음 → 전체 검색 결과에서 유사도 분석") + candidates = fallback_products + analysis_mode = "fallback_similarity_only" + else: + analysis_mode = "matched_products" + + try: + analyzer = SimilarityAnalyzerONNX() + + logger.info( + f"키워드 '{keyword}'와 {len(candidates)}개 상품의 유사도 분석 시작... (모드: {analysis_mode})" + ) + + # 한 개만 있으면 바로 선택 + if len(candidates) == 1: + selected_product = candidates[0] + + logger.info("단일 후보 상품 - 유사도 검증 진행") + # 유사도 계산 + similarity = analyzer.calculate_similarity( + keyword, selected_product["title"] + ) + + # 폴백 모드에서는 임계값 검증 + if analysis_mode == "fallback_similarity_only": + similarity_threshold = 0.3 + if similarity < similarity_threshold: + logger.warning( + f"단일 상품 유사도 미달: similarity={similarity:.4f} < threshold={similarity_threshold}" + ) + return { + "job_id": request.job_id, + "schedule_id": request.schedule_id, + "schedule_his_id": request.schedule_his_id, + "keyword": keyword, + "selected_product": None, + "reason": f"단일 상품 유사도({similarity:.4f}) < 기준({similarity_threshold})", + "status": "success", + } + + selected_product["similarity_info"] = { + "similarity_score": float(similarity), + "analysis_type": "single_candidate", + "analysis_mode": analysis_mode, + } + + logger.success( + f"단일 상품 선택 완료: title='{selected_product['title'][:30]}', similarity={similarity:.4f}" + ) + + return { + "job_id": request.job_id, + "schedule_id": request.schedule_id, + "schedule_his_id": request.schedule_his_id, + "keyword": keyword, + "selected_product": selected_product, + "reason": f"단일 상품 - 유사도: {similarity:.4f} ({analysis_mode})", + "status": "success", + } + + # 여러 개가 있으면 유사도 비교 + logger.info("여러 상품 중 최고 유사도로 선택...") + + # 제목만 추출해서 배치 분석 + titles = [product["title"] for product in candidates] + similarity_results = analyzer.analyze_similarity_batch(keyword, titles) + + # 결과 출력 + logger.info("유사도 분석 결과:") + for i, result in enumerate(similarity_results[:5]): # 상위 5개만 로그 + logger.info( + f" {i+1}위: {result['title'][:40]} | 유사도: {result['similarity']:.4f}" + ) + + # 최고 유사도 선택 + best_result = similarity_results[0] + selected_product = candidates[best_result["index"]].copy() + + # 폴백 모드에서는 임계값 검증 + similarity_threshold = 0.3 + if ( + analysis_mode == "fallback_similarity_only" + and best_result["similarity"] < similarity_threshold + ): + logger.warning( + f"최고 유사도 미달: similarity={best_result['similarity']:.4f} < threshold={similarity_threshold}" + ) + return { + "job_id": request.job_id, + "schedule_id": request.schedule_id, + "schedule_his_id": request.schedule_his_id, + "keyword": keyword, + "selected_product": None, + "reason": f"최고 유사도({best_result['similarity']:.4f}) < 기준({similarity_threshold})", + "status": "success", + } + + # 유사도 정보 추가 + selected_product["similarity_info"] = { + "similarity_score": best_result["similarity"], + "analysis_type": "multi_candidate_bert", + "analysis_mode": analysis_mode, + "rank": 1, + "total_candidates": len(candidates), + } + + # 매칭 모드에서는 종합 점수도 계산 + if analysis_mode == "matched_products" and "match_info" in selected_product: + match_score = selected_product["match_info"]["match_score"] + similarity_score = best_result["similarity"] + # 가중치: 매칭 40%, 유사도 60% + final_score = match_score * 0.4 + similarity_score * 0.6 + selected_product["final_score"] = final_score + reason = f"종합점수({final_score:.4f}) = 매칭({match_score:.4f})*0.4 + 유사도({similarity_score:.4f})*0.6" + logger.info( + f"종합 점수 계산: match_score={match_score:.4f}, similarity_score={similarity_score:.4f}, final_score={final_score:.4f}" + ) + else: + reason = f"유사도({best_result['similarity']:.4f}) 기준 선택 ({analysis_mode})" + + logger.success( + f"상품 선택 완료: title='{selected_product['title'][:30]}', {reason}" + ) + + return { + "job_id": request.job_id, + "schedule_id": request.schedule_id, + "schedule_his_id": request.schedule_his_id, + "keyword": keyword, + "selected_product": selected_product, + "reason": reason, + "status": "success", + } + + except Exception as e: + logger.error( + f"유사도 분석 서비스 오류: job_id={request.job_id}, keyword='{keyword}', error='{e}'" + ) + raise InvalidItemDataException() diff --git a/apps/pre-processing-service/app/utils/similarity_analyzer.py b/apps/pre-processing-service/app/utils/similarity_analyzer.py index a5e855e7..d4e7c0c5 100644 --- a/apps/pre-processing-service/app/utils/similarity_analyzer.py +++ b/apps/pre-processing-service/app/utils/similarity_analyzer.py @@ -1,110 +1,93 @@ -# import torch -# import numpy as np -# from sklearn.metrics.pairwise import cosine_similarity -# from transformers import AutoTokenizer, AutoModel -# from loguru import logger -# -# -# class SimilarityAnalyzer: -# """텍스트 유사도 분석기""" -# -# def __init__(self): -# try: -# logger.info("KLUE BERT 모델 로딩 시도 중...") -# self.tokenizer = AutoTokenizer.from_pretrained("klue/bert-base") -# self.model = AutoModel.from_pretrained("klue/bert-base") -# logger.success("KLUE BERT 모델 로딩 성공") -# except Exception as e: -# logger.warning(f"KLUE BERT 로딩 실패, 다국어 BERT로 대체: {e}") -# try: -# logger.info("다국어 BERT 모델 로딩 시도 중...") -# self.tokenizer = AutoTokenizer.from_pretrained( -# "bert-base-multilingual-cased" -# ) -# self.model = AutoModel.from_pretrained("bert-base-multilingual-cased") -# logger.success("다국어 BERT 모델 로딩 성공") -# except Exception as e2: -# logger.error(f"모든 BERT 모델 로딩 실패: {e2}") -# raise e2 -# -# def get_embedding(self, text: str) -> np.ndarray: -# """텍스트 임베딩 생성""" -# try: -# logger.debug(f"임베딩 생성 시작: text='{text[:50]}'") -# inputs = self.tokenizer( -# text, return_tensors="pt", padding=True, truncation=True, max_length=128 -# ) -# with torch.no_grad(): -# outputs = self.model(**inputs) -# embedding = outputs.last_hidden_state[:, 0, :].numpy() -# logger.debug(f"임베딩 생성 완료: shape={embedding.shape}") -# return embedding -# except Exception as e: -# logger.error(f"임베딩 생성 오류: text='{text[:30]}', error='{e}'") -# raise -# -# def calculate_similarity(self, text1: str, text2: str) -> float: -# """두 텍스트 간 유사도 계산""" -# try: -# logger.debug( -# f"유사도 계산 시작: text1='{text1[:30]}', text2='{text2[:30]}'" -# ) -# embedding1 = self.get_embedding(text1) -# embedding2 = self.get_embedding(text2) -# similarity = cosine_similarity(embedding1, embedding2)[0][0] -# logger.debug(f"유사도 계산 완료: similarity={similarity:.4f}") -# return similarity -# except Exception as e: -# logger.error( -# f"유사도 계산 오류: text1='{text1[:30]}', text2='{text2[:30]}', error='{e}'" -# ) -# raise -# -# def analyze_similarity_batch( -# self, keyword: str, product_titles: list[str] -# ) -> list[dict]: -# """배치로 유사도 분석""" -# logger.info( -# f"배치 유사도 분석 시작: keyword='{keyword}', titles_count={len(product_titles)}" -# ) -# -# try: -# keyword_embedding = self.get_embedding(keyword) -# results = [] -# -# for i, title in enumerate(product_titles): -# try: -# logger.debug( -# f"유사도 계산 중 ({i + 1}/{len(product_titles)}): title='{title[:30]}'" -# ) -# title_embedding = self.get_embedding(title) -# similarity = cosine_similarity(keyword_embedding, title_embedding)[ -# 0 -# ][0] -# -# results.append( -# { -# "index": i, -# "title": title, -# "similarity": float(similarity), -# "score": float(similarity), -# } -# ) -# logger.debug( -# f"유사도 계산 완료 ({i + 1}/{len(product_titles)}): similarity={similarity:.4f}" -# ) -# except Exception as e: -# logger.error(f"유사도 계산 오류 (제목: {title[:30]}): {e}") -# results.append( -# {"index": i, "title": title, "similarity": 0.0, "score": 0.0} -# ) -# -# # 유사도 기준 내림차순 정렬 -# results.sort(key=lambda x: x["similarity"], reverse=True) -# logger.info( -# f"배치 유사도 분석 완료: 총 {len(results)}개, 최고 유사도={results[0]['similarity']:.4f}" -# ) -# return results -# except Exception as e: -# logger.error(f"배치 유사도 분석 실패: keyword='{keyword}', error='{e}'") -# raise +import numpy as np +from sklearn.metrics.pairwise import cosine_similarity +from loguru import logger +import onnxruntime as ort +from transformers import AutoTokenizer + + +class SimilarityAnalyzerONNX: + """ONNX 기반 텍스트 유사도 분석기""" + + def __init__(self, model_path: str = "klue_bert.onnx"): + try: + logger.info("토크나이저 로딩 중: klue/bert-base") + self.tokenizer = AutoTokenizer.from_pretrained("klue/bert-base") + logger.info(f"ONNX 모델 로딩 중: {model_path}") + self.ort_session = ort.InferenceSession(model_path) + logger.success("ONNX 모델 로딩 성공") + except Exception as e: + logger.error(f"모델 로딩 실패: {e}") + raise e + + def get_embedding(self, text: str) -> np.ndarray: + """텍스트 임베딩 생성 (ONNX)""" + try: + logger.debug(f"임베딩 생성 시작: text='{text[:50]}'") + # 토큰화 + inputs = self.tokenizer( + text, return_tensors="np", padding=True, truncation=True, max_length=128 + ) + ort_inputs = { + "input_ids": inputs["input_ids"].astype(np.int64), + "attention_mask": inputs["attention_mask"].astype(np.int64), + } + ort_outs = self.ort_session.run(None, ort_inputs) + embedding = ort_outs[0][:, 0, :] # [CLS] 토큰 임베딩 + logger.debug(f"임베딩 생성 완료: shape={embedding.shape}") + return embedding + except Exception as e: + logger.error(f"임베딩 생성 오류: text='{text[:30]}', error='{e}'") + raise + + def calculate_similarity(self, text1: str, text2: str) -> float: + """두 텍스트 간 유사도 계산""" + try: + logger.debug( + f"유사도 계산 시작: text1='{text1[:30]}', text2='{text2[:30]}'" + ) + emb1 = self.get_embedding(text1) + emb2 = self.get_embedding(text2) + similarity = cosine_similarity(emb1, emb2)[0][0] + logger.debug(f"유사도 계산 완료: similarity={similarity:.4f}") + return similarity + except Exception as e: + logger.error(f"유사도 계산 오류: {e}") + raise + + def analyze_similarity_batch( + self, keyword: str, product_titles: list[str] + ) -> list[dict]: + """배치 유사도 분석""" + logger.info( + f"배치 유사도 분석 시작: keyword='{keyword}', titles_count={len(product_titles)}" + ) + try: + keyword_emb = self.get_embedding(keyword) + results = [] + + for i, title in enumerate(product_titles): + try: + title_emb = self.get_embedding(title) + sim = cosine_similarity(keyword_emb, title_emb)[0][0] + results.append( + { + "index": i, + "title": title, + "similarity": float(sim), + "score": float(sim), + } + ) + except Exception as e: + logger.error(f"유사도 계산 오류 (제목: {title[:30]}): {e}") + results.append( + {"index": i, "title": title, "similarity": 0.0, "score": 0.0} + ) + + results.sort(key=lambda x: x["similarity"], reverse=True) + logger.info( + f"배치 유사도 분석 완료: 총 {len(results)}개, 최고 유사도={results[0]['similarity']:.4f}" + ) + return results + except Exception as e: + logger.error(f"배치 유사도 분석 실패: {e}") + raise diff --git a/apps/pre-processing-service/poetry.lock b/apps/pre-processing-service/poetry.lock index e65412d3..49d36b65 100644 --- a/apps/pre-processing-service/poetry.lock +++ b/apps/pre-processing-service/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. [[package]] name = "annotated-types" @@ -438,6 +438,24 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "coloredlogs" +version = "15.0.1" +description = "Colored terminal output for Python's logging module" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["main"] +files = [ + {file = "coloredlogs-15.0.1-py2.py3-none-any.whl", hash = "sha256:612ee75c546f53e92e70049c9dbfcc18c935a2b9a53b66085ce9ef6a6e5c0934"}, + {file = "coloredlogs-15.0.1.tar.gz", hash = "sha256:7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0"}, +] + +[package.dependencies] +humanfriendly = ">=9.1" + +[package.extras] +cron = ["capturer (>=2.4)"] + [[package]] name = "dbutils" version = "3.1.2" @@ -477,6 +495,18 @@ all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (> standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] +[[package]] +name = "flatbuffers" +version = "25.2.10" +description = "The FlatBuffers serialization format for Python" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "flatbuffers-25.2.10-py2.py3-none-any.whl", hash = "sha256:ebba5f4d5ea615af3f7fd70fc310636fbb2bbd1f566ac0a23d98dd412de50051"}, + {file = "flatbuffers-25.2.10.tar.gz", hash = "sha256:97e451377a41262f8d9bd4295cc836133415cc03d8cb966410a4af92eb00d26e"}, +] + [[package]] name = "google" version = "3.0.0" @@ -746,14 +776,14 @@ trio = ["trio (>=0.22.0,<1.0)"] [[package]] name = "httplib2" -version = "0.30.2" +version = "0.31.0" description = "A comprehensive HTTP client library." optional = false python-versions = ">=3.6" groups = ["main"] files = [ - {file = "httplib2-0.30.2-py3-none-any.whl", hash = "sha256:62a665905c1f1d1069c34f933787d2a4435c67c0bc2b323645dcfbb64661b5ec"}, - {file = "httplib2-0.30.2.tar.gz", hash = "sha256:050bde6a332824b05a3deef5238f2b0372f71af46f8ca2190c2cb1f66aa376cd"}, + {file = "httplib2-0.31.0-py3-none-any.whl", hash = "sha256:b9cd78abea9b4e43a7714c6e0f8b6b8561a6fc1e95d5dbd367f5bf0ef35f5d24"}, + {file = "httplib2-0.31.0.tar.gz", hash = "sha256:ac7ab497c50975147d4f7b1ade44becc7df2f8954d42b38b3d69c515f531135c"}, ] [package.dependencies] @@ -784,6 +814,21 @@ http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] zstd = ["zstandard (>=0.18.0)"] +[[package]] +name = "humanfriendly" +version = "10.0" +description = "Human friendly output for text interfaces using Python" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["main"] +files = [ + {file = "humanfriendly-10.0-py2.py3-none-any.whl", hash = "sha256:1697e1a8a8f550fd43c2865cd84542fc175a61dcb779b6fee18cf6b6ccba1477"}, + {file = "humanfriendly-10.0.tar.gz", hash = "sha256:6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc"}, +] + +[package.dependencies] +pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_version >= \"3.8\""} + [[package]] name = "idna" version = "3.10" @@ -895,6 +940,24 @@ files = [ unidic = ["unidic"] unidic-lite = ["unidic-lite"] +[[package]] +name = "mpmath" +version = "1.3.0" +description = "Python library for arbitrary-precision floating-point arithmetic" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"}, + {file = "mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f"}, +] + +[package.extras] +develop = ["codecov", "pycodestyle", "pytest (>=4.6)", "pytest-cov", "wheel"] +docs = ["sphinx"] +gmpy = ["gmpy2 (>=2.1.0a4) ; platform_python_implementation != \"PyPy\""] +tests = ["pytest (>=4.6)"] + [[package]] name = "mypy-extensions" version = "1.1.0" @@ -1008,6 +1071,42 @@ rsa = ["cryptography (>=3.0.0)"] signals = ["blinker (>=1.4.0)"] signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] +[[package]] +name = "onnxruntime" +version = "1.22.1" +description = "ONNX Runtime is a runtime accelerator for Machine Learning models" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "onnxruntime-1.22.1-cp310-cp310-macosx_13_0_universal2.whl", hash = "sha256:80e7f51da1f5201c1379b8d6ef6170505cd800e40da216290f5e06be01aadf95"}, + {file = "onnxruntime-1.22.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b89ddfdbbdaf7e3a59515dee657f6515601d55cb21a0f0f48c81aefc54ff1b73"}, + {file = "onnxruntime-1.22.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bddc75868bcf6f9ed76858a632f65f7b1846bdcefc6d637b1e359c2c68609964"}, + {file = "onnxruntime-1.22.1-cp310-cp310-win_amd64.whl", hash = "sha256:01e2f21b2793eb0c8642d2be3cee34cc7d96b85f45f6615e4e220424158877ce"}, + {file = "onnxruntime-1.22.1-cp311-cp311-macosx_13_0_universal2.whl", hash = "sha256:f4581bccb786da68725d8eac7c63a8f31a89116b8761ff8b4989dc58b61d49a0"}, + {file = "onnxruntime-1.22.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7ae7526cf10f93454beb0f751e78e5cb7619e3b92f9fc3bd51aa6f3b7a8977e5"}, + {file = "onnxruntime-1.22.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f6effa1299ac549a05c784d50292e3378dbbf010346ded67400193b09ddc2f04"}, + {file = "onnxruntime-1.22.1-cp311-cp311-win_amd64.whl", hash = "sha256:f28a42bb322b4ca6d255531bb334a2b3e21f172e37c1741bd5e66bc4b7b61f03"}, + {file = "onnxruntime-1.22.1-cp312-cp312-macosx_13_0_universal2.whl", hash = "sha256:a938d11c0dc811badf78e435daa3899d9af38abee950d87f3ab7430eb5b3cf5a"}, + {file = "onnxruntime-1.22.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:984cea2a02fcc5dfea44ade9aca9fe0f7a8a2cd6f77c258fc4388238618f3928"}, + {file = "onnxruntime-1.22.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2d39a530aff1ec8d02e365f35e503193991417788641b184f5b1e8c9a6d5ce8d"}, + {file = "onnxruntime-1.22.1-cp312-cp312-win_amd64.whl", hash = "sha256:6a64291d57ea966a245f749eb970f4fa05a64d26672e05a83fdb5db6b7d62f87"}, + {file = "onnxruntime-1.22.1-cp313-cp313-macosx_13_0_universal2.whl", hash = "sha256:d29c7d87b6cbed8fecfd09dca471832384d12a69e1ab873e5effbb94adc3e966"}, + {file = "onnxruntime-1.22.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:460487d83b7056ba98f1f7bac80287224c31d8149b15712b0d6f5078fcc33d0f"}, + {file = "onnxruntime-1.22.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b0c37070268ba4e02a1a9d28560cd00cd1e94f0d4f275cbef283854f861a65fa"}, + {file = "onnxruntime-1.22.1-cp313-cp313-win_amd64.whl", hash = "sha256:70980d729145a36a05f74b573435531f55ef9503bcda81fc6c3d6b9306199982"}, + {file = "onnxruntime-1.22.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:33a7980bbc4b7f446bac26c3785652fe8730ed02617d765399e89ac7d44e0f7d"}, + {file = "onnxruntime-1.22.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e7e823624b015ea879d976cbef8bfaed2f7e2cc233d7506860a76dd37f8f381"}, +] + +[package.dependencies] +coloredlogs = "*" +flatbuffers = "*" +numpy = ">=1.21.6" +packaging = "*" +protobuf = "*" +sympy = "*" + [[package]] name = "outcome" version = "1.3.0.post0" @@ -1112,21 +1211,21 @@ testing = ["google-api-core (>=1.31.5)"] [[package]] name = "protobuf" -version = "6.32.0" +version = "6.32.1" description = "" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "protobuf-6.32.0-cp310-abi3-win32.whl", hash = "sha256:84f9e3c1ff6fb0308dbacb0950d8aa90694b0d0ee68e75719cb044b7078fe741"}, - {file = "protobuf-6.32.0-cp310-abi3-win_amd64.whl", hash = "sha256:a8bdbb2f009cfc22a36d031f22a625a38b615b5e19e558a7b756b3279723e68e"}, - {file = "protobuf-6.32.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d52691e5bee6c860fff9a1c86ad26a13afbeb4b168cd4445c922b7e2cf85aaf0"}, - {file = "protobuf-6.32.0-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:501fe6372fd1c8ea2a30b4d9be8f87955a64d6be9c88a973996cef5ef6f0abf1"}, - {file = "protobuf-6.32.0-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:75a2aab2bd1aeb1f5dc7c5f33bcb11d82ea8c055c9becbb41c26a8c43fd7092c"}, - {file = "protobuf-6.32.0-cp39-cp39-win32.whl", hash = "sha256:7db8ed09024f115ac877a1427557b838705359f047b2ff2f2b2364892d19dacb"}, - {file = "protobuf-6.32.0-cp39-cp39-win_amd64.whl", hash = "sha256:15eba1b86f193a407607112ceb9ea0ba9569aed24f93333fe9a497cf2fda37d3"}, - {file = "protobuf-6.32.0-py3-none-any.whl", hash = "sha256:ba377e5b67b908c8f3072a57b63e2c6a4cbd18aea4ed98d2584350dbf46f2783"}, - {file = "protobuf-6.32.0.tar.gz", hash = "sha256:a81439049127067fc49ec1d36e25c6ee1d1a2b7be930675f919258d03c04e7d2"}, + {file = "protobuf-6.32.1-cp310-abi3-win32.whl", hash = "sha256:a8a32a84bc9f2aad712041b8b366190f71dde248926da517bde9e832e4412085"}, + {file = "protobuf-6.32.1-cp310-abi3-win_amd64.whl", hash = "sha256:b00a7d8c25fa471f16bc8153d0e53d6c9e827f0953f3c09aaa4331c718cae5e1"}, + {file = "protobuf-6.32.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d8c7e6eb619ffdf105ee4ab76af5a68b60a9d0f66da3ea12d1640e6d8dab7281"}, + {file = "protobuf-6.32.1-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:2f5b80a49e1eb7b86d85fcd23fe92df154b9730a725c3b38c4e43b9d77018bf4"}, + {file = "protobuf-6.32.1-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:b1864818300c297265c83a4982fd3169f97122c299f56a56e2445c3698d34710"}, + {file = "protobuf-6.32.1-cp39-cp39-win32.whl", hash = "sha256:68ff170bac18c8178f130d1ccb94700cf72852298e016a2443bdb9502279e5f1"}, + {file = "protobuf-6.32.1-cp39-cp39-win_amd64.whl", hash = "sha256:d0975d0b2f3e6957111aa3935d08a0eb7e006b1505d825f862a1fffc8348e122"}, + {file = "protobuf-6.32.1-py3-none-any.whl", hash = "sha256:2601b779fc7d32a866c6b4404f9d42a3f67c5b9f3f15b4db3cccabe06b95c346"}, + {file = "protobuf-6.32.1.tar.gz", hash = "sha256:ee2469e4a021474ab9baafea6cd070e5bf27c7d29433504ddea1a4ee5850f68d"}, ] [[package]] @@ -1462,6 +1561,22 @@ files = [ {file = "pyperclip-1.9.0.tar.gz", hash = "sha256:b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310"}, ] +[[package]] +name = "pyreadline3" +version = "3.5.4" +description = "A python implementation of GNU readline." +optional = false +python-versions = ">=3.8" +groups = ["main"] +markers = "sys_platform == \"win32\"" +files = [ + {file = "pyreadline3-3.5.4-py3-none-any.whl", hash = "sha256:eaf8e6cc3c49bcccf145fc6067ba8643d1df34d604a1ec0eccbf7a18e6d3fae6"}, + {file = "pyreadline3-3.5.4.tar.gz", hash = "sha256:8d57d53039a1c75adba8e50dd3d992b28143480816187ea5efbd5c78e6c885b7"}, +] + +[package.extras] +dev = ["build", "flake8", "mypy", "pytest", "twine"] + [[package]] name = "pysocks" version = "1.7.1" @@ -1626,67 +1741,73 @@ tests = ["matplotlib (>=3.5.0)", "mypy (>=1.15)", "numpydoc (>=1.2.0)", "pandas [[package]] name = "scipy" -version = "1.16.1" +version = "1.16.2" description = "Fundamental algorithms for scientific computing in Python" optional = false python-versions = ">=3.11" groups = ["main"] files = [ - {file = "scipy-1.16.1-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:c033fa32bab91dc98ca59d0cf23bb876454e2bb02cbe592d5023138778f70030"}, - {file = "scipy-1.16.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:6e5c2f74e5df33479b5cd4e97a9104c511518fbd979aa9b8f6aec18b2e9ecae7"}, - {file = "scipy-1.16.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:0a55ffe0ba0f59666e90951971a884d1ff6f4ec3275a48f472cfb64175570f77"}, - {file = "scipy-1.16.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:f8a5d6cd147acecc2603fbd382fed6c46f474cccfcf69ea32582e033fb54dcfe"}, - {file = "scipy-1.16.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cb18899127278058bcc09e7b9966d41a5a43740b5bb8dcba401bd983f82e885b"}, - {file = "scipy-1.16.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adccd93a2fa937a27aae826d33e3bfa5edf9aa672376a4852d23a7cd67a2e5b7"}, - {file = "scipy-1.16.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:18aca1646a29ee9a0625a1be5637fa798d4d81fdf426481f06d69af828f16958"}, - {file = "scipy-1.16.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d85495cef541729a70cdddbbf3e6b903421bc1af3e8e3a9a72a06751f33b7c39"}, - {file = "scipy-1.16.1-cp311-cp311-win_amd64.whl", hash = "sha256:226652fca853008119c03a8ce71ffe1b3f6d2844cc1686e8f9806edafae68596"}, - {file = "scipy-1.16.1-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:81b433bbeaf35728dad619afc002db9b189e45eebe2cd676effe1fb93fef2b9c"}, - {file = "scipy-1.16.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:886cc81fdb4c6903a3bb0464047c25a6d1016fef77bb97949817d0c0d79f9e04"}, - {file = "scipy-1.16.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:15240c3aac087a522b4eaedb09f0ad061753c5eebf1ea430859e5bf8640d5919"}, - {file = "scipy-1.16.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:65f81a25805f3659b48126b5053d9e823d3215e4a63730b5e1671852a1705921"}, - {file = "scipy-1.16.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6c62eea7f607f122069b9bad3f99489ddca1a5173bef8a0c75555d7488b6f725"}, - {file = "scipy-1.16.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f965bbf3235b01c776115ab18f092a95aa74c271a52577bcb0563e85738fd618"}, - {file = "scipy-1.16.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f006e323874ffd0b0b816d8c6a8e7f9a73d55ab3b8c3f72b752b226d0e3ac83d"}, - {file = "scipy-1.16.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e8fd15fc5085ab4cca74cb91fe0a4263b1f32e4420761ddae531ad60934c2119"}, - {file = "scipy-1.16.1-cp312-cp312-win_amd64.whl", hash = "sha256:f7b8013c6c066609577d910d1a2a077021727af07b6fab0ee22c2f901f22352a"}, - {file = "scipy-1.16.1-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:5451606823a5e73dfa621a89948096c6528e2896e40b39248295d3a0138d594f"}, - {file = "scipy-1.16.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:89728678c5ca5abd610aee148c199ac1afb16e19844401ca97d43dc548a354eb"}, - {file = "scipy-1.16.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:e756d688cb03fd07de0fffad475649b03cb89bee696c98ce508b17c11a03f95c"}, - {file = "scipy-1.16.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:5aa2687b9935da3ed89c5dbed5234576589dd28d0bf7cd237501ccfbdf1ad608"}, - {file = "scipy-1.16.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0851f6a1e537fe9399f35986897e395a1aa61c574b178c0d456be5b1a0f5ca1f"}, - {file = "scipy-1.16.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fedc2cbd1baed37474b1924c331b97bdff611d762c196fac1a9b71e67b813b1b"}, - {file = "scipy-1.16.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2ef500e72f9623a6735769e4b93e9dcb158d40752cdbb077f305487e3e2d1f45"}, - {file = "scipy-1.16.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:978d8311674b05a8f7ff2ea6c6bce5d8b45a0cb09d4c5793e0318f448613ea65"}, - {file = "scipy-1.16.1-cp313-cp313-win_amd64.whl", hash = "sha256:81929ed0fa7a5713fcdd8b2e6f73697d3b4c4816d090dd34ff937c20fa90e8ab"}, - {file = "scipy-1.16.1-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:bcc12db731858abda693cecdb3bdc9e6d4bd200213f49d224fe22df82687bdd6"}, - {file = "scipy-1.16.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:744d977daa4becb9fc59135e75c069f8d301a87d64f88f1e602a9ecf51e77b27"}, - {file = "scipy-1.16.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:dc54f76ac18073bcecffb98d93f03ed6b81a92ef91b5d3b135dcc81d55a724c7"}, - {file = "scipy-1.16.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:367d567ee9fc1e9e2047d31f39d9d6a7a04e0710c86e701e053f237d14a9b4f6"}, - {file = "scipy-1.16.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4cf5785e44e19dcd32a0e4807555e1e9a9b8d475c6afff3d21c3c543a6aa84f4"}, - {file = "scipy-1.16.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3d0b80fb26d3e13a794c71d4b837e2a589d839fd574a6bbb4ee1288c213ad4a3"}, - {file = "scipy-1.16.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:8503517c44c18d1030d666cb70aaac1cc8913608816e06742498833b128488b7"}, - {file = "scipy-1.16.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:30cc4bb81c41831ecfd6dc450baf48ffd80ef5aed0f5cf3ea775740e80f16ecc"}, - {file = "scipy-1.16.1-cp313-cp313t-win_amd64.whl", hash = "sha256:c24fa02f7ed23ae514460a22c57eca8f530dbfa50b1cfdbf4f37c05b5309cc39"}, - {file = "scipy-1.16.1-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:796a5a9ad36fa3a782375db8f4241ab02a091308eb079746bc0f874c9b998318"}, - {file = "scipy-1.16.1-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:3ea0733a2ff73fd6fdc5fecca54ee9b459f4d74f00b99aced7d9a3adb43fb1cc"}, - {file = "scipy-1.16.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:85764fb15a2ad994e708258bb4ed8290d1305c62a4e1ef07c414356a24fcfbf8"}, - {file = "scipy-1.16.1-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:ca66d980469cb623b1759bdd6e9fd97d4e33a9fad5b33771ced24d0cb24df67e"}, - {file = "scipy-1.16.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e7cc1ffcc230f568549fc56670bcf3df1884c30bd652c5da8138199c8c76dae0"}, - {file = "scipy-1.16.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3ddfb1e8d0b540cb4ee9c53fc3dea3186f97711248fb94b4142a1b27178d8b4b"}, - {file = "scipy-1.16.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4dc0e7be79e95d8ba3435d193e0d8ce372f47f774cffd882f88ea4e1e1ddc731"}, - {file = "scipy-1.16.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f23634f9e5adb51b2a77766dac217063e764337fbc816aa8ad9aaebcd4397fd3"}, - {file = "scipy-1.16.1-cp314-cp314-win_amd64.whl", hash = "sha256:57d75524cb1c5a374958a2eae3d84e1929bb971204cc9d52213fb8589183fc19"}, - {file = "scipy-1.16.1-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:d8da7c3dd67bcd93f15618938f43ed0995982eb38973023d46d4646c4283ad65"}, - {file = "scipy-1.16.1-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:cc1d2f2fd48ba1e0620554fe5bc44d3e8f5d4185c8c109c7fbdf5af2792cfad2"}, - {file = "scipy-1.16.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:21a611ced9275cb861bacadbada0b8c0623bc00b05b09eb97f23b370fc2ae56d"}, - {file = "scipy-1.16.1-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:8dfbb25dffc4c3dd9371d8ab456ca81beeaf6f9e1c2119f179392f0dc1ab7695"}, - {file = "scipy-1.16.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f0ebb7204f063fad87fc0a0e4ff4a2ff40b2a226e4ba1b7e34bf4b79bf97cd86"}, - {file = "scipy-1.16.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f1b9e5962656f2734c2b285a8745358ecb4e4efbadd00208c80a389227ec61ff"}, - {file = "scipy-1.16.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e1a106f8c023d57a2a903e771228bf5c5b27b5d692088f457acacd3b54511e4"}, - {file = "scipy-1.16.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:709559a1db68a9abc3b2c8672c4badf1614f3b440b3ab326d86a5c0491eafae3"}, - {file = "scipy-1.16.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c0c804d60492a0aad7f5b2bb1862f4548b990049e27e828391ff2bf6f7199998"}, - {file = "scipy-1.16.1.tar.gz", hash = "sha256:44c76f9e8b6e8e488a586190ab38016e4ed2f8a038af7cd3defa903c0a2238b3"}, + {file = "scipy-1.16.2-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:6ab88ea43a57da1af33292ebd04b417e8e2eaf9d5aa05700be8d6e1b6501cd92"}, + {file = "scipy-1.16.2-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:c95e96c7305c96ede73a7389f46ccd6c659c4da5ef1b2789466baeaed3622b6e"}, + {file = "scipy-1.16.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:87eb178db04ece7c698220d523c170125dbffebb7af0345e66c3554f6f60c173"}, + {file = "scipy-1.16.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:4e409eac067dcee96a57fbcf424c13f428037827ec7ee3cb671ff525ca4fc34d"}, + {file = "scipy-1.16.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e574be127bb760f0dad24ff6e217c80213d153058372362ccb9555a10fc5e8d2"}, + {file = "scipy-1.16.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f5db5ba6188d698ba7abab982ad6973265b74bb40a1efe1821b58c87f73892b9"}, + {file = "scipy-1.16.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ec6e74c4e884104ae006d34110677bfe0098203a3fec2f3faf349f4cb05165e3"}, + {file = "scipy-1.16.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:912f46667d2d3834bc3d57361f854226475f695eb08c08a904aadb1c936b6a88"}, + {file = "scipy-1.16.2-cp311-cp311-win_amd64.whl", hash = "sha256:91e9e8a37befa5a69e9cacbe0bcb79ae5afb4a0b130fd6db6ee6cc0d491695fa"}, + {file = "scipy-1.16.2-cp311-cp311-win_arm64.whl", hash = "sha256:f3bf75a6dcecab62afde4d1f973f1692be013110cad5338007927db8da73249c"}, + {file = "scipy-1.16.2-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:89d6c100fa5c48472047632e06f0876b3c4931aac1f4291afc81a3644316bb0d"}, + {file = "scipy-1.16.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:ca748936cd579d3f01928b30a17dc474550b01272d8046e3e1ee593f23620371"}, + {file = "scipy-1.16.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:fac4f8ce2ddb40e2e3d0f7ec36d2a1e7f92559a2471e59aec37bd8d9de01fec0"}, + {file = "scipy-1.16.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:033570f1dcefd79547a88e18bccacff025c8c647a330381064f561d43b821232"}, + {file = "scipy-1.16.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ea3421209bf00c8a5ef2227de496601087d8f638a2363ee09af059bd70976dc1"}, + {file = "scipy-1.16.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f66bd07ba6f84cd4a380b41d1bf3c59ea488b590a2ff96744845163309ee8e2f"}, + {file = "scipy-1.16.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e9feab931bd2aea4a23388c962df6468af3d808ddf2d40f94a81c5dc38f32ef"}, + {file = "scipy-1.16.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:03dfc75e52f72cf23ec2ced468645321407faad8f0fe7b1f5b49264adbc29cb1"}, + {file = "scipy-1.16.2-cp312-cp312-win_amd64.whl", hash = "sha256:0ce54e07bbb394b417457409a64fd015be623f36e330ac49306433ffe04bc97e"}, + {file = "scipy-1.16.2-cp312-cp312-win_arm64.whl", hash = "sha256:2a8ffaa4ac0df81a0b94577b18ee079f13fecdb924df3328fc44a7dc5ac46851"}, + {file = "scipy-1.16.2-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:84f7bf944b43e20b8a894f5fe593976926744f6c185bacfcbdfbb62736b5cc70"}, + {file = "scipy-1.16.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:5c39026d12edc826a1ef2ad35ad1e6d7f087f934bb868fc43fa3049c8b8508f9"}, + {file = "scipy-1.16.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:e52729ffd45b68777c5319560014d6fd251294200625d9d70fd8626516fc49f5"}, + {file = "scipy-1.16.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:024dd4a118cccec09ca3209b7e8e614931a6ffb804b2a601839499cb88bdf925"}, + {file = "scipy-1.16.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7a5dc7ee9c33019973a470556081b0fd3c9f4c44019191039f9769183141a4d9"}, + {file = "scipy-1.16.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c2275ff105e508942f99d4e3bc56b6ef5e4b3c0af970386ca56b777608ce95b7"}, + {file = "scipy-1.16.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:af80196eaa84f033e48444d2e0786ec47d328ba00c71e4299b602235ffef9acb"}, + {file = "scipy-1.16.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9fb1eb735fe3d6ed1f89918224e3385fbf6f9e23757cacc35f9c78d3b712dd6e"}, + {file = "scipy-1.16.2-cp313-cp313-win_amd64.whl", hash = "sha256:fda714cf45ba43c9d3bae8f2585c777f64e3f89a2e073b668b32ede412d8f52c"}, + {file = "scipy-1.16.2-cp313-cp313-win_arm64.whl", hash = "sha256:2f5350da923ccfd0b00e07c3e5cfb316c1c0d6c1d864c07a72d092e9f20db104"}, + {file = "scipy-1.16.2-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:53d8d2ee29b925344c13bda64ab51785f016b1b9617849dac10897f0701b20c1"}, + {file = "scipy-1.16.2-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:9e05e33657efb4c6a9d23bd8300101536abd99c85cca82da0bffff8d8764d08a"}, + {file = "scipy-1.16.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:7fe65b36036357003b3ef9d37547abeefaa353b237e989c21027b8ed62b12d4f"}, + {file = "scipy-1.16.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:6406d2ac6d40b861cccf57f49592f9779071655e9f75cd4f977fa0bdd09cb2e4"}, + {file = "scipy-1.16.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ff4dc42bd321991fbf611c23fc35912d690f731c9914bf3af8f417e64aca0f21"}, + {file = "scipy-1.16.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:654324826654d4d9133e10675325708fb954bc84dae6e9ad0a52e75c6b1a01d7"}, + {file = "scipy-1.16.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:63870a84cd15c44e65220eaed2dac0e8f8b26bbb991456a033c1d9abfe8a94f8"}, + {file = "scipy-1.16.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:fa01f0f6a3050fa6a9771a95d5faccc8e2f5a92b4a2e5440a0fa7264a2398472"}, + {file = "scipy-1.16.2-cp313-cp313t-win_amd64.whl", hash = "sha256:116296e89fba96f76353a8579820c2512f6e55835d3fad7780fece04367de351"}, + {file = "scipy-1.16.2-cp313-cp313t-win_arm64.whl", hash = "sha256:98e22834650be81d42982360382b43b17f7ba95e0e6993e2a4f5b9ad9283a94d"}, + {file = "scipy-1.16.2-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:567e77755019bb7461513c87f02bb73fb65b11f049aaaa8ca17cfaa5a5c45d77"}, + {file = "scipy-1.16.2-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:17d9bb346194e8967296621208fcdfd39b55498ef7d2f376884d5ac47cec1a70"}, + {file = "scipy-1.16.2-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:0a17541827a9b78b777d33b623a6dcfe2ef4a25806204d08ead0768f4e529a88"}, + {file = "scipy-1.16.2-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:d7d4c6ba016ffc0f9568d012f5f1eb77ddd99412aea121e6fa8b4c3b7cbad91f"}, + {file = "scipy-1.16.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9702c4c023227785c779cba2e1d6f7635dbb5b2e0936cdd3a4ecb98d78fd41eb"}, + {file = "scipy-1.16.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d1cdf0ac28948d225decdefcc45ad7dd91716c29ab56ef32f8e0d50657dffcc7"}, + {file = "scipy-1.16.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:70327d6aa572a17c2941cdfb20673f82e536e91850a2e4cb0c5b858b690e1548"}, + {file = "scipy-1.16.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5221c0b2a4b58aa7c4ed0387d360fd90ee9086d383bb34d9f2789fafddc8a936"}, + {file = "scipy-1.16.2-cp314-cp314-win_amd64.whl", hash = "sha256:f5a85d7b2b708025af08f060a496dd261055b617d776fc05a1a1cc69e09fe9ff"}, + {file = "scipy-1.16.2-cp314-cp314-win_arm64.whl", hash = "sha256:2cc73a33305b4b24556957d5857d6253ce1e2dcd67fa0ff46d87d1670b3e1e1d"}, + {file = "scipy-1.16.2-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:9ea2a3fed83065d77367775d689401a703d0f697420719ee10c0780bcab594d8"}, + {file = "scipy-1.16.2-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:7280d926f11ca945c3ef92ba960fa924e1465f8d07ce3a9923080363390624c4"}, + {file = "scipy-1.16.2-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:8afae1756f6a1fe04636407ef7dbece33d826a5d462b74f3d0eb82deabefd831"}, + {file = "scipy-1.16.2-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:5c66511f29aa8d233388e7416a3f20d5cae7a2744d5cee2ecd38c081f4e861b3"}, + {file = "scipy-1.16.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:efe6305aeaa0e96b0ccca5ff647a43737d9a092064a3894e46c414db84bc54ac"}, + {file = "scipy-1.16.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7f3a337d9ae06a1e8d655ee9d8ecb835ea5ddcdcbd8d23012afa055ab014f374"}, + {file = "scipy-1.16.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bab3605795d269067d8ce78a910220262711b753de8913d3deeaedb5dded3bb6"}, + {file = "scipy-1.16.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b0348d8ddb55be2a844c518cd8cc8deeeb8aeba707cf834db5758fc89b476a2c"}, + {file = "scipy-1.16.2-cp314-cp314t-win_amd64.whl", hash = "sha256:26284797e38b8a75e14ea6631d29bda11e76ceaa6ddb6fdebbfe4c4d90faf2f9"}, + {file = "scipy-1.16.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d2a4472c231328d4de38d5f1f68fdd6d28a615138f842580a8a321b5845cf779"}, + {file = "scipy-1.16.2.tar.gz", hash = "sha256:af029b153d243a80afb6eabe40b0a07f8e35c9adc269c019f364ad747f826a6b"}, ] [package.dependencies] @@ -1695,7 +1816,7 @@ numpy = ">=1.25.2,<2.6" [package.extras] dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodestyle", "pydevtool", "rich-click", "ruff (>=0.0.292)", "types-psutil", "typing_extensions"] doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.19.1)", "jupytext", "linkify-it-py", "matplotlib (>=3.5)", "myst-nb (>=1.2.0)", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.2.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)"] -test = ["Cython", "array-api-strict (>=2.3.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja ; sys_platform != \"emscripten\"", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] +test = ["Cython", "array-api-strict (>=2.3.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja ; sys_platform != \"emscripten\"", "pooch", "pytest (>=8.0.0)", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] [[package]] name = "selenium" @@ -1868,6 +1989,24 @@ typing-extensions = {version = ">=4.10.0", markers = "python_version < \"3.13\"" [package.extras] full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.18)", "pyyaml"] +[[package]] +name = "sympy" +version = "1.14.0" +description = "Computer algebra system (CAS) in Python" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5"}, + {file = "sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517"}, +] + +[package.dependencies] +mpmath = ">=1.1.0,<1.4" + +[package.extras] +dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] + [[package]] name = "threadpoolctl" version = "3.6.0" @@ -2047,4 +2186,4 @@ h11 = ">=0.9.0,<1" [metadata] lock-version = "2.1" python-versions = ">=3.11,<3.14" -content-hash = "4977aa61a86e0ad28813ae35592d3911f058b2893f46b87677d7a77b61d9d06f" +content-hash = "9ca2813b1931948bd0600aa974faba9311a7cf00ea632ea4db5f9fcc80ebc518" diff --git a/apps/pre-processing-service/pyproject.toml b/apps/pre-processing-service/pyproject.toml index 93b6c1da..f8cabbff 100644 --- a/apps/pre-processing-service/pyproject.toml +++ b/apps/pre-processing-service/pyproject.toml @@ -5,15 +5,8 @@ description = "" authors = [ {name = "skip"} ] -readme = "README.md" requires-python = ">=3.11,<3.14" - -#[[tool.poetry.source]] -#name = "pytorch" -#url = "https://download.pytorch.org/whl/cpu" -#priority = "explicit" - [tool.poetry.dependencies] python = ">=3.11,<3.14" fastapi = ">=0.116.1,<0.117.0" @@ -28,7 +21,6 @@ bs4 = ">=0.0.2,<0.0.3" selenium = ">=4.35.0,<5.0.0" #transformers = ">=4.56.0,<5.0.0" numpy = ">=2.3.2,<3.0.0" -#torch = ">=2.8.0,<3.0.0" scikit-learn = ">=1.7.1,<2.0.0" python-dotenv = ">=1.1.1,<2.0.0" mecab-python3 = ">=1.0.10,<2.0.0" @@ -41,6 +33,7 @@ google-auth-oauthlib = "^1.2.2" google-api-python-client = "^2.181.0" poetry-core=">=2.1.3,<3.0.0" dbutils=">=3.1.2,<4.0.0" +onnxruntime = "^1.22.1" [build-system] requires = ["poetry-core>=2.0.0,<3.0.0"] diff --git a/docker/production/docker-compose.yml b/docker/production/docker-compose.yml index 659934c7..f3016096 100644 --- a/docker/production/docker-compose.yml +++ b/docker/production/docker-compose.yml @@ -38,10 +38,14 @@ services: - app-network env_file: - .env.prod + volumes: + - onnx_models:/app/models # ONNX 모델 저장용 볼륨 -> 서버에 만들어야함 volumes: caddy_data: caddy_config: + onnx_models: + driver: local networks: app-network: diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 00000000..3557bc5a --- /dev/null +++ b/poetry.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. +package = [] + +[metadata] +lock-version = "2.1" +python-versions = ">=3.11" +content-hash = "f5666f5625d676c506924a57dc0520a1f3ed2b2c774baed3dc85353594f8473d"