From 35e5e78f13447c615355ffff2fc590b2733e6935 Mon Sep 17 00:00:00 2001 From: qidanrui Date: Thu, 30 Nov 2023 07:43:25 +0000 Subject: [PATCH 1/3] remove pygraphviz in poetry --- poetry.lock | 12 +----------- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6175f79..b5298cd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2388,16 +2388,6 @@ files = [ [package.extras] plugins = ["importlib-metadata"] -[[package]] -name = "pygraphviz" -version = "1.11" -description = "Python interface to Graphviz" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pygraphviz-1.11.zip", hash = "sha256:a97eb5ced266f45053ebb1f2c6c6d29091690503e3a5c14be7f908b37b06f2d4"}, -] - [[package]] name = "pylint" version = "3.0.2" @@ -4257,4 +4247,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "a8ce8b51e3b3b20018b2a4e52eac65479bb04e7b6eb39138832b1c66a9cb22b5" +content-hash = "c604a299b6b9fcb011c963bc8470c4a758baba2bb8e04c17918928d5c7c70043" diff --git a/pyproject.toml b/pyproject.toml index 68c212a..93a6bd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,6 @@ nvidia-nccl-cu12 = "2.18.1" nvidia-nvtx-cu12 = "12.1.105" triton = "2.1.0" nvidia-nvjitlink-cu12 = "^12.3.52" -pygraphviz = "^1.11" [build-system] requires = ["poetry-core"] From 8359ba8be8c56bc4a074e1bb216eb32e12fab17b Mon Sep 17 00:00:00 2001 From: qidanrui Date: Fri, 1 Dec 2023 14:01:28 +0000 Subject: [PATCH 2/3] update bitsandbytes to 0.41.2 --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index b5298cd..e15138d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -262,13 +262,13 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte [[package]] name = "bitsandbytes" -version = "0.39.0" +version = "0.41.2" description = "k-bit optimizers and matrix multiplication routines." optional = false python-versions = "*" files = [ - {file = "bitsandbytes-0.39.0-py3-none-any.whl", hash = "sha256:69e79cfce501cad5e34e9d785f5caf1768ead64f3e9f93b6bac1753e04dfa39a"}, - {file = "bitsandbytes-0.39.0.tar.gz", hash = "sha256:b453dacf854e3624fe72b1306b1a6916de4a5edfd88fa01bf98ba73b2e3030d4"}, + {file = "bitsandbytes-0.41.2-py3-none-any.whl", hash = "sha256:5a2280761dc11c7a23a1be948cfd6a849c2e718012ee34316b979eb6c5634de2"}, + {file = "bitsandbytes-0.41.2.tar.gz", hash = "sha256:787c14b63cc559e1b344f683497a9353ac2e256a3fe89972f960e7c428d5cce7"}, ] [[package]] @@ -4247,4 +4247,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "c604a299b6b9fcb011c963bc8470c4a758baba2bb8e04c17918928d5c7c70043" +content-hash = "fd8272ceaaac7b87bea6c6c49f11a7a3a791dece4cfb7eac34578a6a561dba6f" diff --git a/pyproject.toml b/pyproject.toml index 93a6bd4..a415cb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,6 @@ python = ">=3.10,<3.13" transformers = "4.33.2" peft = "0.4.0" accelerate = "0.21.0" -bitsandbytes = "0.39.0" einops = "0.6.1" evaluate = "0.4.0" scikit-learn = "1.2.2" @@ -57,6 +56,7 @@ nvidia-nccl-cu12 = "2.18.1" nvidia-nvtx-cu12 = "12.1.105" triton = "2.1.0" nvidia-nvjitlink-cu12 = "^12.3.52" +bitsandbytes = "0.41.2" [build-system] requires = ["poetry-core"] From b35533ee9c771eeed2e685242c129e1525cb8248 Mon Sep 17 00:00:00 2001 From: qidanrui Date: Fri, 1 Dec 2023 14:15:16 +0000 Subject: [PATCH 3/3] handle invalid output from models --- dbgpt_hub/predict/predict.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbgpt_hub/predict/predict.py b/dbgpt_hub/predict/predict.py index e4653b7..6d67722 100644 --- a/dbgpt_hub/predict/predict.py +++ b/dbgpt_hub/predict/predict.py @@ -49,7 +49,10 @@ def main(): with open(predict_output_dir_name, "w") as f: for p in result: - f.write(p.replace("\n", " ") + "\n") + try: + f.write(p.replace("\n", " ") + "\n") + except: + f.write("Invalid Output!\n") if __name__ == "__main__":