From 5b9de4a1d37d0f9beccc782f0f7ad6a051b52673 Mon Sep 17 00:00:00 2001 From: OlivierDehaene Date: Thu, 13 Jul 2023 21:54:55 +0200 Subject: [PATCH] fix(server): blacklist local files (#609) Close #589 #602 --- server/text_generation_server/utils/convert.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/text_generation_server/utils/convert.py b/server/text_generation_server/utils/convert.py index 305263b..8d414ec 100644 --- a/server/text_generation_server/utils/convert.py +++ b/server/text_generation_server/utils/convert.py @@ -94,6 +94,14 @@ def convert_files(pt_files: List[Path], sf_files: List[Path], discard_names: Lis # We do this instead of using tqdm because we want to parse the logs with the launcher for i, (pt_file, sf_file) in enumerate(zip(pt_files, sf_files)): + # Skip blacklisted files + if ( + "arguments" in pt_file.name + or "args" in pt_file.name + or "training" in pt_file.name + ): + continue + start = datetime.datetime.now() convert_file(pt_file, sf_file, discard_names) elapsed = datetime.datetime.now() - start