From 3b6f2b8fb2181655117199bdeb44268d05055b2c Mon Sep 17 00:00:00 2001 From: bilal-aamer Date: Sun, 22 Oct 2023 02:58:41 +0530 Subject: [PATCH 1/2] add scalene dependency --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 406ba0e3..9986fc0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ dependencies = [ "peft>=0.5.0", "trl>=0.7.2", "pinecone-client>=2.2.4" + "scalene>=1.5.31.1" ] [project.optional-dependencies] From 84afbb033768d50469dfdca9c5b499bf55934b91 Mon Sep 17 00:00:00 2001 From: bilal-aamer Date: Sun, 22 Oct 2023 03:55:37 +0530 Subject: [PATCH 2/2] profiling a test file --- .gitignore | 4 +++- src/llm_vm/vector_db.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 88f2fae8..eeb06992 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,6 @@ dist settings.toml *.pkl -.idea/ \ No newline at end of file +.idea/ +src/llm_vm/profile.html +src/llm_vm/profile.json diff --git a/src/llm_vm/vector_db.py b/src/llm_vm/vector_db.py index a7c72f0f..b5ee87a9 100644 --- a/src/llm_vm/vector_db.py +++ b/src/llm_vm/vector_db.py @@ -1,5 +1,7 @@ import pinecone +from scalene import profile +@profile class PineconeDB: def __init__(self, api_key, pinecone_env): self.pinecone = pinecone