Fix some tests (#1573)
## Describe your changes - Fix some tests. - Update test failure reason. ## Checklist before requesting a review - [ ] Add unit tests for this change. - [ ] Make sure all tests can pass. - [ ] Update documents if necessary. - [ ] Lint and apply fixes to your code by running `lintrunner -a` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. - [ ] Is this PR including examples changes? If yes, please remember to update [example documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md) in a follow-up PR. ## (Optional) Issue link
This commit is contained in:
Родитель
c6b092ae07
Коммит
f4c4f38aff
|
@ -2,12 +2,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
# --------------------------------------------------------------------------
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from test.integ_test.utils import get_olive_workspace_config
|
||||
|
||||
import pytest
|
||||
|
||||
from olive.azureml.azureml_client import AzureMLClientConfig
|
||||
from olive.model import ModelConfig
|
||||
from olive.passes.olive_pass import create_pass_from_dict
|
||||
|
@ -16,7 +13,6 @@ from olive.resource_path import ResourcePath
|
|||
from olive.systems.azureml import AzureMLDockerConfig, AzureMLSystem
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info > (3, 8), reason="Failed with Python 3.10, need to investigate.")
|
||||
def test_aml_model_pass_run(tmp_path):
|
||||
# ------------------------------------------------------------------
|
||||
# Azure ML System
|
||||
|
|
|
@ -15,7 +15,7 @@ from olive.passes.onnx.nvmo_quantization import NVModelOptQuantization
|
|||
|
||||
@pytest.mark.skipif(
|
||||
version.parse(onnxruntime.__version__) > version.parse("1.20.1"),
|
||||
reason="Fails on onnxruntime 1.21",
|
||||
reason="ORT 1.21 doesn't support Volta anymore. Reenable this test once we switch to a new SKU.",
|
||||
)
|
||||
def test_nvmo_quantization(tmp_path):
|
||||
ov_model = get_onnx_model()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# --------------------------------------------------------------------------
|
||||
import json
|
||||
import platform
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import venv
|
||||
|
@ -49,11 +50,9 @@ class TestIsolatedORTSystemConfig:
|
|||
with pytest.raises(ValueError, match="python_environment_path is required for IsolatedORTSystem"):
|
||||
SystemConfig.parse_obj(config)
|
||||
|
||||
# TODO(team): Failed in pipeline (win). Need to investigate.
|
||||
@pytest.mark.skipif(True, reason="Failed in pipeline (win). Need to investigate.")
|
||||
def test_invalid_isolated_system_config(self):
|
||||
config = {"type": "IsolatedORT", "config": {"python_environment_path": "invalid_path"}}
|
||||
with pytest.raises(ValueError, match=f"Python path {Path('invalid_path').resolve()} does not exist"):
|
||||
with pytest.raises(ValueError, match=re.escape(f"Python path {Path('invalid_path').resolve()} does not exist")):
|
||||
SystemConfig.parse_obj(config)
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче