From 6fc6ff2ef5b64c1bafba841f964f7f152ab1005f Mon Sep 17 00:00:00 2001 From: NextFire Date: Mon, 1 Jul 2024 21:29:26 +0200 Subject: [PATCH] [anilist] delete recsys endpoint remove polars and scikit-learn deps --- nanapi/models/anilist.py | 6 -- nanapi/routers/anilist.py | 28 ------- nanapi/utils/anilist.py | 79 +------------------- poetry.lock | 153 +------------------------------------- pyproject.toml | 2 - 5 files changed, 3 insertions(+), 265 deletions(-) diff --git a/nanapi/models/anilist.py b/nanapi/models/anilist.py index db186c9..1ada058 100644 --- a/nanapi/models/anilist.py +++ b/nanapi/models/anilist.py @@ -5,7 +5,6 @@ from pydantic import BaseModel from nanapi.database.anilist.account_merge import ACCOUNT_MERGE_SERVICE -from nanapi.database.anilist.media_select import MediaSelectResult from nanapi.models.waicolle import RANKS, WaicolleRank @@ -352,8 +351,3 @@ class StaffNameAutocompleteResult(BaseModel): id_al: int name_user_preferred: str name_native: str | None = None - - -class RecommendationResult(BaseModel): - media: MediaSelectResult - score: float diff --git a/nanapi/routers/anilist.py b/nanapi/routers/anilist.py index c188da2..6461ee1 100644 --- a/nanapi/routers/anilist.py +++ b/nanapi/routers/anilist.py @@ -1,6 +1,3 @@ -from typing import cast - -import polars as pl from edgedb.errors import ConstraintViolationError from fastapi import HTTPException, status from fastapi.responses import StreamingResponse @@ -35,12 +32,10 @@ MEDIA_TYPES, CharaNameAutocompleteResult, MediaTitleAutocompleteResult, - RecommendationResult, StaffNameAutocompleteResult, UpsertAnilistAccountBody, ) from nanapi.settings import INSTANCE_NAME -from nanapi.utils.anilist import predict_scores from nanapi.utils.clients import get_edgedb, get_meilisearch from nanapi.utils.collages import chara_collage, media_collage from nanapi.utils.fastapi import HTTPExceptionModel, NanAPIRouter @@ -90,29 +85,6 @@ async def get_account_entries(discord_id: int, return resp -@router.oauth2.get('/accounts/{discord_id}/recommendations', - response_model=list[RecommendationResult]) -async def get_account_recommendations(discord_id: int): - p_scores, entries = await predict_scores() - user_entries = entries.filter(pl.col('discord_id') == discord_id) - if str(discord_id) not in p_scores: - return [] - top_50 = ( - p_scores - .filter(~pl.col('id_al').is_in(user_entries.select('id_al').to_series())) - .select(['id_al', str(discord_id)]) - .sort(str(discord_id), descending=True) - .head(50) - ) - ids_al = cast(list[int], top_50.select('id_al').to_series().to_list()) - medias = await media_select(get_edgedb(), ids_al=ids_al) - medias_map = {m.id_al: m for m in medias} - return [ - RecommendationResult(media=medias_map[id_al], score=score) - for id_al, score in top_50.rows() - ] - - ########## # Medias # ########## diff --git a/nanapi/utils/anilist.py b/nanapi/utils/anilist.py index 35b0b64..3528df0 100644 --- a/nanapi/utils/anilist.py +++ b/nanapi/utils/anilist.py @@ -3,27 +3,19 @@ import time from abc import ABC, abstractmethod from dataclasses import dataclass, field -from datetime import timedelta from itertools import count, filterfalse from typing import Any, Generator, Generic, Optional, Self, Type, TypeVar import aiohttp -import numpy as np import orjson -import polars as pl -from asyncache import cached -from cachetools import TTLCache from edgedb import AsyncIOExecutor from pydantic import TypeAdapter -from sklearn import preprocessing -from sklearn.decomposition import TruncatedSVD from toolz.curried import concat from toolz.itertoolz import partition_all from nanapi.database.anilist.c_edge_merge_combined_by_chara import c_edge_merge_combined_by_chara from nanapi.database.anilist.c_edge_merge_multiple import c_edge_merge_multiple from nanapi.database.anilist.chara_merge_multiple import chara_merge_multiple -from nanapi.database.anilist.entry_select_all import entry_select_all from nanapi.database.anilist.media_merge_combined_charas import media_merge_combined_charas from nanapi.database.anilist.media_merge_multiple import media_merge_multiple from nanapi.database.anilist.media_select_all_ids import MediaSelectAllIdsResult @@ -46,7 +38,7 @@ MediaType, ) from nanapi.settings import LOW_PRIORITY_THRESH, MAL_CLIENT_ID -from nanapi.utils.clients import get_edgedb, get_session +from nanapi.utils.clients import get_session from nanapi.utils.misc import default_backoff logger = logging.getLogger(__name__) @@ -1183,72 +1175,3 @@ async def edgedb_split_merge(executor: AsyncIOExecutor, medias: list, await staff_merge_multiple(executor, staffs=part) for part in partition_all(MERGE_COMBINED_MAX_SIZE, edges): await c_edge_merge_multiple(executor, edges=part) - - -async def get_entries_df(): - entries_data = await entry_select_all(get_edgedb()) - entries = pl.DataFrame([ - dict( - status=e.status.value, - score=e.score, - id_al=e.media.id_al, - discord_id=e.account.user.discord_id, - ) for e in entries_data - ]) - return entries - - -def entries_to_scores_df(entries: pl.DataFrame) -> pl.DataFrame: - scores = entries.pivot('discord_id', index='id_al', - values='score', aggregate_function='max') - return scores - - -@cached(cache=TTLCache(1024, ttl=timedelta(hours=6).seconds)) -async def predict_scores() -> tuple[pl.DataFrame, pl.DataFrame]: - entries = await get_entries_df() - - # Remove PLANNING entries - entries = entries.filter(pl.col('status') != 'PLANNING') - - # Remove users without any scored entries (null std = useless data) - entries = entries.filter(pl.col('score').sum().over('discord_id') > 0) - - # Fill missing scores - entries = entries.with_columns( - pl.when(pl.col('score') > 0) - .then(pl.col('score')) # Nothing to do - .when(pl.col('status') == 'CURRENT') - .then(pl.col('score').filter(pl.col('score') > 0).quantile(0.50).over('discord_id')) - .when(pl.col('status') == 'COMPLETED') - .then(pl.col('score').filter(pl.col('score') > 0).quantile(0.25).over('discord_id')) - .when(pl.col('status') == 'PAUSED') - .then(pl.col('score').filter(pl.col('score') > 0).quantile(0.25).over('discord_id')) - .when(pl.col('status') == 'DROPPED') - .then(0) - .when(pl.col('status') == 'REPEATING') - .then(pl.col('score').filter(pl.col('score') > 0).quantile(0.75).over('discord_id')) - .otherwise(pl.col('score')) # Should not happen - .alias('score') - ) - - scores = entries_to_scores_df(entries) - scores_np = scores.select(pl.all().exclude('id_al')).to_numpy() - - # Standardize - scaler = preprocessing.StandardScaler() - std_scores = scaler.fit_transform(scores_np) - - # SVD - svd = TruncatedSVD(n_components=2) - decomp = svd.fit_transform(np.nan_to_num(std_scores)) - - # Reconstruct - p_scores_np = svd.inverse_transform(decomp) - p_scores_np = scaler.inverse_transform(p_scores_np) - p_scores = pl.concat( - (scores.select('id_al'), - pl.DataFrame(p_scores_np, schema=scores.columns[1:])), - how='horizontal') - - return p_scores, entries diff --git a/poetry.lock b/poetry.lock index d942222..b2f0bbf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiodns" @@ -1069,17 +1069,6 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] -[[package]] -name = "joblib" -version = "1.4.2" -description = "Lightweight pipelining with Python functions" -optional = false -python-versions = ">=3.8" -files = [ - {file = "joblib-1.4.2-py3-none-any.whl", hash = "sha256:06d478d5674cbc267e7496a410ee875abd68e4340feff4490bcb7afb88060ae6"}, - {file = "joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e"}, -] - [[package]] name = "markdown-it-py" version = "3.0.0" @@ -1538,46 +1527,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa typing = ["typing-extensions"] xmp = ["defusedxml"] -[[package]] -name = "polars" -version = "1.0.0" -description = "Blazingly fast DataFrame library" -optional = false -python-versions = ">=3.8" -files = [ - {file = "polars-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:cf454ee75a2346cd7f44fb536cc69af7a26d8a243ea58bda50f6c810742c76ad"}, - {file = "polars-1.0.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:8191d8b5cf68d5ebaf9efb497120ff6d7e607a57a116bcce43618d50a536fe1c"}, - {file = "polars-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5b58575fd7ddc12bc53adfde933da3b40c2841fdc5396fecbd85e80dfc9332e"}, - {file = "polars-1.0.0-cp38-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:44475877179f261f4ce1a6cfa0fc955392798b9987c17fc2b1a4b294602ace8a"}, - {file = "polars-1.0.0-cp38-abi3-win_amd64.whl", hash = "sha256:bd483045c0629afced9e9ebc83b58550640022db5924d553a068a57621260a22"}, - {file = "polars-1.0.0.tar.gz", hash = "sha256:144a63d6d61dc5d675304673c4261ceccf4cfc75277431389d4afe9a5be0f70b"}, -] - -[package.extras] -adbc = ["adbc-driver-manager[dbapi]", "adbc-driver-sqlite[dbapi]"] -all = ["polars[async,cloudpickle,database,deltalake,excel,fsspec,graph,iceberg,numpy,pandas,plot,pyarrow,pydantic,style,timezone]"] -async = ["gevent"] -calamine = ["fastexcel (>=0.9)"] -cloudpickle = ["cloudpickle"] -connectorx = ["connectorx (>=0.3.2)"] -database = ["nest-asyncio", "polars[adbc,connectorx,sqlalchemy]"] -deltalake = ["deltalake (>=0.15.0)"] -excel = ["polars[calamine,openpyxl,xlsx2csv,xlsxwriter]"] -fsspec = ["fsspec"] -graph = ["matplotlib"] -iceberg = ["pyiceberg (>=0.5.0)"] -numpy = ["numpy (>=1.16.0,<2.0.0)"] -openpyxl = ["openpyxl (>=3.0.0)"] -pandas = ["pandas", "polars[pyarrow]"] -plot = ["hvplot (>=0.9.1)", "polars[pandas]"] -pyarrow = ["pyarrow (>=7.0.0)"] -pydantic = ["pydantic"] -sqlalchemy = ["polars[pandas]", "sqlalchemy"] -style = ["great-tables (>=0.8.0)"] -timezone = ["backports-zoneinfo", "tzdata"] -xlsx2csv = ["xlsx2csv (>=0.8.0)"] -xlsxwriter = ["xlsxwriter"] - [[package]] name = "priority" version = "2.0.0" @@ -2072,93 +2021,6 @@ files = [ {file = "ruff-0.5.0.tar.gz", hash = "sha256:eb641b5873492cf9bd45bc9c5ae5320648218e04386a5f0c264ad6ccce8226a1"}, ] -[[package]] -name = "scikit-learn" -version = "1.5.0" -description = "A set of python modules for machine learning and data mining" -optional = false -python-versions = ">=3.9" -files = [ - {file = "scikit_learn-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:12e40ac48555e6b551f0a0a5743cc94cc5a765c9513fe708e01f0aa001da2801"}, - {file = "scikit_learn-1.5.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:f405c4dae288f5f6553b10c4ac9ea7754d5180ec11e296464adb5d6ac68b6ef5"}, - {file = "scikit_learn-1.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df8ccabbf583315f13160a4bb06037bde99ea7d8211a69787a6b7c5d4ebb6fc3"}, - {file = "scikit_learn-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c75ea812cd83b1385bbfa94ae971f0d80adb338a9523f6bbcb5e0b0381151d4"}, - {file = "scikit_learn-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:a90c5da84829a0b9b4bf00daf62754b2be741e66b5946911f5bdfaa869fcedd6"}, - {file = "scikit_learn-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2a65af2d8a6cce4e163a7951a4cfbfa7fceb2d5c013a4b593686c7f16445cf9d"}, - {file = "scikit_learn-1.5.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:4c0c56c3005f2ec1db3787aeaabefa96256580678cec783986836fc64f8ff622"}, - {file = "scikit_learn-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f77547165c00625551e5c250cefa3f03f2fc92c5e18668abd90bfc4be2e0bff"}, - {file = "scikit_learn-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:118a8d229a41158c9f90093e46b3737120a165181a1b58c03461447aa4657415"}, - {file = "scikit_learn-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:a03b09f9f7f09ffe8c5efffe2e9de1196c696d811be6798ad5eddf323c6f4d40"}, - {file = "scikit_learn-1.5.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:460806030c666addee1f074788b3978329a5bfdc9b7d63e7aad3f6d45c67a210"}, - {file = "scikit_learn-1.5.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:1b94d6440603752b27842eda97f6395f570941857456c606eb1d638efdb38184"}, - {file = "scikit_learn-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d82c2e573f0f2f2f0be897e7a31fcf4e73869247738ab8c3ce7245549af58ab8"}, - {file = "scikit_learn-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3a10e1d9e834e84d05e468ec501a356226338778769317ee0b84043c0d8fb06"}, - {file = "scikit_learn-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:855fc5fa8ed9e4f08291203af3d3e5fbdc4737bd617a371559aaa2088166046e"}, - {file = "scikit_learn-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:40fb7d4a9a2db07e6e0cae4dc7bdbb8fada17043bac24104d8165e10e4cff1a2"}, - {file = "scikit_learn-1.5.0-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:47132440050b1c5beb95f8ba0b2402bbd9057ce96ec0ba86f2f445dd4f34df67"}, - {file = "scikit_learn-1.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:174beb56e3e881c90424e21f576fa69c4ffcf5174632a79ab4461c4c960315ac"}, - {file = "scikit_learn-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261fe334ca48f09ed64b8fae13f9b46cc43ac5f580c4a605cbb0a517456c8f71"}, - {file = "scikit_learn-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:057b991ac64b3e75c9c04b5f9395eaf19a6179244c089afdebaad98264bff37c"}, - {file = "scikit_learn-1.5.0.tar.gz", hash = "sha256:789e3db01c750ed6d496fa2db7d50637857b451e57bcae863bff707c1247bef7"}, -] - -[package.dependencies] -joblib = ">=1.2.0" -numpy = ">=1.19.5" -scipy = ">=1.6.0" -threadpoolctl = ">=3.1.0" - -[package.extras] -benchmark = ["matplotlib (>=3.3.4)", "memory_profiler (>=0.57.0)", "pandas (>=1.1.5)"] -build = ["cython (>=3.0.10)", "meson-python (>=0.15.0)", "numpy (>=1.19.5)", "scipy (>=1.6.0)"] -docs = ["Pillow (>=7.1.2)", "matplotlib (>=3.3.4)", "memory_profiler (>=0.57.0)", "numpydoc (>=1.2.0)", "pandas (>=1.1.5)", "plotly (>=5.14.0)", "polars (>=0.20.23)", "pooch (>=1.6.0)", "scikit-image (>=0.17.2)", "seaborn (>=0.9.0)", "sphinx (>=6.0.0)", "sphinx-copybutton (>=0.5.2)", "sphinx-gallery (>=0.15.0)", "sphinx-prompt (>=1.3.0)", "sphinxext-opengraph (>=0.4.2)"] -examples = ["matplotlib (>=3.3.4)", "pandas (>=1.1.5)", "plotly (>=5.14.0)", "pooch (>=1.6.0)", "scikit-image (>=0.17.2)", "seaborn (>=0.9.0)"] -install = ["joblib (>=1.2.0)", "numpy (>=1.19.5)", "scipy (>=1.6.0)", "threadpoolctl (>=3.1.0)"] -maintenance = ["conda-lock (==2.5.6)"] -tests = ["black (>=24.3.0)", "matplotlib (>=3.3.4)", "mypy (>=1.9)", "numpydoc (>=1.2.0)", "pandas (>=1.1.5)", "polars (>=0.20.23)", "pooch (>=1.6.0)", "pyamg (>=4.0.0)", "pyarrow (>=12.0.0)", "pytest (>=7.1.2)", "pytest-cov (>=2.9.0)", "ruff (>=0.2.1)", "scikit-image (>=0.17.2)"] - -[[package]] -name = "scipy" -version = "1.14.0" -description = "Fundamental algorithms for scientific computing in Python" -optional = false -python-versions = ">=3.10" -files = [ - {file = "scipy-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7e911933d54ead4d557c02402710c2396529540b81dd554fc1ba270eb7308484"}, - {file = "scipy-1.14.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:687af0a35462402dd851726295c1a5ae5f987bd6e9026f52e9505994e2f84ef6"}, - {file = "scipy-1.14.0-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:07e179dc0205a50721022344fb85074f772eadbda1e1b3eecdc483f8033709b7"}, - {file = "scipy-1.14.0-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:6a9c9a9b226d9a21e0a208bdb024c3982932e43811b62d202aaf1bb59af264b1"}, - {file = "scipy-1.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:076c27284c768b84a45dcf2e914d4000aac537da74236a0d45d82c6fa4b7b3c0"}, - {file = "scipy-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42470ea0195336df319741e230626b6225a740fd9dce9642ca13e98f667047c0"}, - {file = "scipy-1.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:176c6f0d0470a32f1b2efaf40c3d37a24876cebf447498a4cefb947a79c21e9d"}, - {file = "scipy-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:ad36af9626d27a4326c8e884917b7ec321d8a1841cd6dacc67d2a9e90c2f0359"}, - {file = "scipy-1.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6d056a8709ccda6cf36cdd2eac597d13bc03dba38360f418560a93050c76a16e"}, - {file = "scipy-1.14.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:f0a50da861a7ec4573b7c716b2ebdcdf142b66b756a0d392c236ae568b3a93fb"}, - {file = "scipy-1.14.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:94c164a9e2498e68308e6e148646e486d979f7fcdb8b4cf34b5441894bdb9caf"}, - {file = "scipy-1.14.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:a7d46c3e0aea5c064e734c3eac5cf9eb1f8c4ceee756262f2c7327c4c2691c86"}, - {file = "scipy-1.14.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9eee2989868e274aae26125345584254d97c56194c072ed96cb433f32f692ed8"}, - {file = "scipy-1.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e3154691b9f7ed73778d746da2df67a19d046a6c8087c8b385bc4cdb2cfca74"}, - {file = "scipy-1.14.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c40003d880f39c11c1edbae8144e3813904b10514cd3d3d00c277ae996488cdb"}, - {file = "scipy-1.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:5b083c8940028bb7e0b4172acafda6df762da1927b9091f9611b0bcd8676f2bc"}, - {file = "scipy-1.14.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:bff2438ea1330e06e53c424893ec0072640dac00f29c6a43a575cbae4c99b2b9"}, - {file = "scipy-1.14.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:bbc0471b5f22c11c389075d091d3885693fd3f5e9a54ce051b46308bc787e5d4"}, - {file = "scipy-1.14.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:64b2ff514a98cf2bb734a9f90d32dc89dc6ad4a4a36a312cd0d6327170339eb0"}, - {file = "scipy-1.14.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:7d3da42fbbbb860211a811782504f38ae7aaec9de8764a9bef6b262de7a2b50f"}, - {file = "scipy-1.14.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d91db2c41dd6c20646af280355d41dfa1ec7eead235642178bd57635a3f82209"}, - {file = "scipy-1.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a01cc03bcdc777c9da3cfdcc74b5a75caffb48a6c39c8450a9a05f82c4250a14"}, - {file = "scipy-1.14.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:65df4da3c12a2bb9ad52b86b4dcf46813e869afb006e58be0f516bc370165159"}, - {file = "scipy-1.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:4c4161597c75043f7154238ef419c29a64ac4a7c889d588ea77690ac4d0d9b20"}, - {file = "scipy-1.14.0.tar.gz", hash = "sha256:b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b"}, -] - -[package.dependencies] -numpy = ">=1.23.5,<2.3" - -[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 = ["jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.13.1)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0)", "sphinx-design (>=0.4.0)"] -test = ["Cython", "array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"] - [[package]] name = "sniffio" version = "1.3.1" @@ -2187,17 +2049,6 @@ anyio = ">=3.4.0,<5" [package.extras] full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] -[[package]] -name = "threadpoolctl" -version = "3.5.0" -description = "threadpoolctl" -optional = false -python-versions = ">=3.8" -files = [ - {file = "threadpoolctl-3.5.0-py3-none-any.whl", hash = "sha256:56c1e26c150397e58c4926da8eeee87533b1e32bef131bd4bf6a2f45f3185467"}, - {file = "threadpoolctl-3.5.0.tar.gz", hash = "sha256:082433502dd922bf738de0d8bcc4fdcbf0979ff44c42bd40f5af8a282f6fa107"}, -] - [[package]] name = "toolz" version = "0.12.1" @@ -2605,4 +2456,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "d4ed07f2ddc01729881b92140737794e091e30b61f2f519c6c35db9a4a1afccc" +content-hash = "1a62f13ef974b38d6c59cd7a9b8ae4c160effd933bcea21fc65369b97da4fa6b" diff --git a/pyproject.toml b/pyproject.toml index 1eea29d..3101b8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,8 +35,6 @@ python-multipart = "0.0.9" passlib = { version = "1.7.4", extras = ["bcrypt"] } cachetools = "5.3.3" asyncache = "0.3.1" -polars = "1.0.0" -scikit-learn = "1.5.0" hypercorn = "0.17.3" tzdata = "2024.1" pyjwt = "2.8.0"