[CI/Build] Skip Prithvi/Terratorch model-registry tests when terratorch is missing (#41389)
Signed-off-by: Stefano Castagnetta <scastagnetta@nvidia.com>
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
|
|
||||||
|
import importlib.util
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from ....conftest import VllmRunner
|
from ....conftest import VllmRunner
|
||||||
|
|
||||||
pytest.importorskip(
|
pytestmark = pytest.mark.skipif(
|
||||||
"terratorch",
|
importlib.util.find_spec("terratorch") is None,
|
||||||
reason="terratorch unavailable while PyPI has `lightning` quarantined; see #41376",
|
reason="terratorch unavailable while PyPI has `lightning` quarantined; see #41376",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,16 @@ def can_initialize(
|
|||||||
"which is not configured in test environment"
|
"which is not configured in test environment"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if model_arch in ("PrithviGeoSpatialMAE", "Terratorch"):
|
||||||
|
import importlib.util
|
||||||
|
|
||||||
|
if importlib.util.find_spec("terratorch") is None:
|
||||||
|
pytest.skip(
|
||||||
|
"terratorch is not installed; "
|
||||||
|
"temporarily skipped while PyPI has `lightning` quarantined "
|
||||||
|
"(see #41376)"
|
||||||
|
)
|
||||||
|
|
||||||
if model_arch in ["DeepseekV32ForCausalLM", "GlmMoeDsaForCausalLM"]:
|
if model_arch in ["DeepseekV32ForCausalLM", "GlmMoeDsaForCausalLM"]:
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,17 @@ def test_registry_imports(model_arch):
|
|||||||
check_max_version=False,
|
check_max_version=False,
|
||||||
check_version_reason="vllm",
|
check_version_reason="vllm",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if model_arch in ("PrithviGeoSpatialMAE", "Terratorch"):
|
||||||
|
import importlib.util
|
||||||
|
|
||||||
|
if importlib.util.find_spec("terratorch") is None:
|
||||||
|
pytest.skip(
|
||||||
|
"terratorch is not installed; "
|
||||||
|
"temporarily skipped while PyPI has `lightning` quarantined "
|
||||||
|
"(see #41376)"
|
||||||
|
)
|
||||||
|
|
||||||
# Ensure all model classes can be imported successfully
|
# Ensure all model classes can be imported successfully
|
||||||
model_cls = ModelRegistry._try_load_model_cls(model_arch)
|
model_cls = ModelRegistry._try_load_model_cls(model_arch)
|
||||||
assert model_cls is not None
|
assert model_cls is not None
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
|
|
||||||
|
import importlib.util
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from tests.conftest import VllmRunner
|
from tests.conftest import VllmRunner
|
||||||
from tests.utils import create_new_process_for_each_test
|
from tests.utils import create_new_process_for_each_test
|
||||||
|
|
||||||
pytest.importorskip(
|
pytestmark = pytest.mark.skipif(
|
||||||
"terratorch",
|
importlib.util.find_spec("terratorch") is None,
|
||||||
reason="terratorch unavailable while PyPI has `lightning` quarantined; see #41376",
|
reason="terratorch unavailable while PyPI has `lightning` quarantined; see #41376",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
|
import importlib.util
|
||||||
import io
|
import io
|
||||||
|
|
||||||
import imagehash
|
import imagehash
|
||||||
@@ -11,8 +12,8 @@ from PIL import Image
|
|||||||
from tests.utils import RemoteOpenAIServer
|
from tests.utils import RemoteOpenAIServer
|
||||||
from vllm.entrypoints.pooling.pooling.protocol import IOProcessorResponse
|
from vllm.entrypoints.pooling.pooling.protocol import IOProcessorResponse
|
||||||
|
|
||||||
pytest.importorskip(
|
pytestmark = pytest.mark.skipif(
|
||||||
"terratorch",
|
importlib.util.find_spec("terratorch") is None,
|
||||||
reason="terratorch unavailable while PyPI has `lightning` quarantined; see #41376",
|
reason="terratorch unavailable while PyPI has `lightning` quarantined; see #41376",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user