Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyu-work committed Dec 24, 2024
1 parent 2375e28 commit d267c92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion test/unit_test/passes/inc/test_inc_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
from olive.passes.onnx.inc_quantization import IncDynamicQuantization, IncQuantization, IncStaticQuantization


# TODO(team), 55133 Linux GPU CI is failing with the following test. Need to investigate and fix it.

Check warning

Code scanning / lintrunner

RUFF/TD004 Warning test

@pytest.mark.skipif(
platform.system() == OS.WINDOWS, reason="Skip test on Windows. neural-compressor import is hanging on Windows."
platform.system() == OS.WINDOWS or torch.cuda.is_available(),
reason="Skip test on Windows. neural-compressor import is hanging on Windows.",
)
def test_inc_quantization(tmp_path):
ov_model = get_onnx_model(tmp_path)
Expand Down
6 changes: 2 additions & 4 deletions test/unit_test/passes/onnx/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# --------------------------------------------------------------------------
import platform
import shutil
import sys
from itertools import chain
from pathlib import Path
import sys
from test.unit_test.utils import ONNX_MODEL_PATH, get_hf_model, get_onnx_model, get_pytorch_model, pytorch_model_loader
from unittest.mock import patch

Expand All @@ -21,9 +21,7 @@
from olive.passes.onnx.conversion import OnnxConversion, OnnxOpVersionConversion


@pytest.mark.skipif(
sys.version_info > (3, 8), reason="Failed with Python 3.10, need to investigate."
)
@pytest.mark.skipif(sys.version_info > (3, 8), reason="Failed with Python 3.10, need to investigate.")
@pytest.mark.parametrize(
("input_model", "use_dynamo_exporter"),
[(get_pytorch_model(), True), (get_hf_model(), True), (get_pytorch_model(), False), (get_hf_model(), False)],
Expand Down

0 comments on commit d267c92

Please sign in to comment.