From 14ca30db4b806996307c0e1de482e482c06b2826 Mon Sep 17 00:00:00 2001 From: sanchitvj Date: Sun, 24 Mar 2024 21:57:48 +0000 Subject: [PATCH] style fixes by ruff --- src/tests/quantize/quantize_test.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/tests/quantize/quantize_test.py b/src/tests/quantize/quantize_test.py index f7b3c51..af0e9dd 100644 --- a/src/tests/quantize/quantize_test.py +++ b/src/tests/quantize/quantize_test.py @@ -8,30 +8,32 @@ quantize_model, ) -root_path = Path(__file__).parent / 'test_data' +root_path = Path(__file__).parent / "test_data" os.makedirs(root_path, exist_ok=True) def test_get_llamacpp_repo(): get_llamacpp_repo(root_path) - repo_path = root_path / 'llama.cpp' / '.git' + repo_path = root_path / "llama.cpp" / ".git" assert os.path.exists(repo_path) def test_build_llamacpp(): building_llamacpp(root_path) - bin_path = root_path / 'llama.cpp' / 'quantize' + bin_path = root_path / "llama.cpp" / "quantize" assert os.path.exists(bin_path) def test_fetch_model_repo(): - fetch_model_repo('meta-llama/Llama-2-7b-chat', root_path) - model_dir_path = root_path / 'llama.cpp' / 'models' / 'Llama-2-7b-chat' + fetch_model_repo("meta-llama/Llama-2-7b-chat", root_path) + model_dir_path = root_path / "llama.cpp" / "models" / "Llama-2-7b-chat" assert os.path.exists(model_dir_path) def test_quantize_model(): - model_dir_path = root_path / 'llama.cpp' / 'models' / 'Llama-2-7b-chat' - quantize_model(model_dir_path, 'Q3_K_M', root_path, output_dir=model_dir_path.parent) + model_dir_path = root_path / "llama.cpp" / "models" / "Llama-2-7b-chat" + quantize_model( + model_dir_path, "Q3_K_M", root_path, output_dir=model_dir_path.parent + ) gguf_file_path = model_dir_path / "ggml-model-Q3_K_M.gguf" assert os.path.exists(gguf_file_path)