feat(ml): model unloading (#2661)

* model cache

* fixed revalidation when using cache namespace

* fixed ttl not being set, added lock
This commit is contained in:
Mert
2023-06-06 21:48:51 -04:00
committed by GitHub
parent 6ce35d47f5
commit d0cc231782
5 changed files with 400 additions and 233 deletions

View File

@@ -10,7 +10,7 @@ packages = [{include = "app"}]
python = "^3.11"
torch = [
{markers = "platform_machine == 'arm64' or platform_machine == 'aarch64'", version = "=2.0.1", source = "pypi"},
{markers = "platform_machine == 'amd64' or platform_machine == 'x86_64'", version = "=2.0.1+cpu", source = "pytorch-cpu"}
{markers = "platform_machine == 'amd64' or platform_machine == 'x86_64'", version = "=2.0.1", source = "pytorch-cpu"}
]
transformers = "^4.29.2"
sentence-transformers = "^2.2.2"
@@ -21,6 +21,7 @@ pillow = "^9.5.0"
fastapi = "^0.95.2"
uvicorn = {extras = ["standard"], version = "^0.22.0"}
pydantic = "^1.10.8"
aiocache = "^0.12.1"
[tool.poetry.group.dev.dependencies]
mypy = "^1.3.0"