Skip to content

Commit 926e6a5

Browse files
wkobielxAlexKoff88
andauthored
Fix acc_conformance tests path issue on windows (#28971)
CVS-162391 This change ensures that all paths are constructed using `os.path.join`, which should help avoid issues with incorrect path syntax on Windows tested locally: ``` ================================================================================================================================= test session starts ================================================================================================================================= platform win32 -- Python 3.11.9, pytest-8.3.4, pluggy-1.5.0 rootdir: C:\IOTG\openvino_fork\openvino\tests\llm collected 8 items / 4 deselected / 4 selected accuracy_conformance.py .... ============================================================================================================ 4 passed, 4 deselected, 20784 warnings in 1004.69s (0:16:44) ============================================================================================================= (openvino_venv) C:\IOTG\openvino_fork\openvino\tests\llm> ``` Co-authored-by: Alexander Kozlov <alexander.kozlov@intel.com>
1 parent b864e7f commit 926e6a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/llm/accuracy_conformance.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def init_test_scope():
4949
tokenizer.save_pretrained(model_path)
5050

5151
ov_model = OVModelForCausalLM.from_pretrained(model_path, load_in_8bit=True)
52-
ov_model_path = model_path + os.path.join(tmp_dir, model_type + "_ov")
52+
ov_model_path = os.path.join(tmp_dir, model_type + "_ov")
5353
ov_model.save_pretrained(ov_model_path)
5454
tokenizer.save_pretrained(ov_model_path)
5555
del ov_model
@@ -59,9 +59,7 @@ def init_test_scope():
5959
quantized_model = OVModelForCausalLM.from_pretrained(
6060
model_path, quantization_config=quantization_config
6161
)
62-
quantized_model_path = model_path = os.path.join(
63-
tmp_dir, model_type + "_ov_int4"
64-
)
62+
quantized_model_path = os.path.join(tmp_dir, model_type + "_ov_int4")
6563
quantized_model.save_pretrained(quantized_model_path)
6664
tokenizer.save_pretrained(quantized_model_path)
6765
del quantized_model

0 commit comments

Comments
 (0)