"...ssh:/git@developer.sourcefind.cn:2222/OpenDAS/dynamo.git" did not exist on "a79122c6e06e03db993951f2c1e74ac65dd62d48"
Unverified Commit cf269dba authored by Anant Sharma's avatar Anant Sharma Committed by GitHub
Browse files

ci: re enable sgl unit tests and remove pyproject.toml from runtime image (#4803)


Signed-off-by: default avatarAnant Sharma <anants@nvidia.com>
parent cc2ee1ed
...@@ -9,8 +9,7 @@ from pathlib import Path ...@@ -9,8 +9,7 @@ from pathlib import Path
import pytest import pytest
# Runs into segfaults, uncomment when resolved and enable tests from dynamo.sglang.args import parse_args
# from dynamo.sglang.args import parse_args
from dynamo.sglang.tests.conftest import make_cli_args_fixture from dynamo.sglang.tests.conftest import make_cli_args_fixture
# Get path relative to this test file # Get path relative to this test file
...@@ -26,9 +25,7 @@ pytestmark = [ ...@@ -26,9 +25,7 @@ pytestmark = [
pytest.mark.sglang, pytest.mark.sglang,
pytest.mark.gpu_1, pytest.mark.gpu_1,
pytest.mark.pre_merge, pytest.mark.pre_merge,
pytest.mark.skip(reason="Running into segfaults in CI"),
] ]
# Create SGLang-specific CLI args fixture # Create SGLang-specific CLI args fixture
# This will use monkeypatch to write to argv # This will use monkeypatch to write to argv
mock_sglang_cli = make_cli_args_fixture("dynamo.sglang") mock_sglang_cli = make_cli_args_fixture("dynamo.sglang")
...@@ -37,8 +34,6 @@ mock_sglang_cli = make_cli_args_fixture("dynamo.sglang") ...@@ -37,8 +34,6 @@ mock_sglang_cli = make_cli_args_fixture("dynamo.sglang")
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_custom_jinja_template_invalid_path(mock_sglang_cli): async def test_custom_jinja_template_invalid_path(mock_sglang_cli):
"""Test that invalid file path raises FileNotFoundError.""" """Test that invalid file path raises FileNotFoundError."""
from dynamo.sglang.args import parse_args
invalid_path = "/nonexistent/path/to/template.jinja" invalid_path = "/nonexistent/path/to/template.jinja"
mock_sglang_cli( mock_sglang_cli(
"--model", "Qwen/Qwen3-0.6B", "--custom-jinja-template", invalid_path "--model", "Qwen/Qwen3-0.6B", "--custom-jinja-template", invalid_path
...@@ -54,8 +49,6 @@ async def test_custom_jinja_template_invalid_path(mock_sglang_cli): ...@@ -54,8 +49,6 @@ async def test_custom_jinja_template_invalid_path(mock_sglang_cli):
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_custom_jinja_template_valid_path(mock_sglang_cli): async def test_custom_jinja_template_valid_path(mock_sglang_cli):
"""Test that valid absolute path is stored correctly.""" """Test that valid absolute path is stored correctly."""
from dynamo.sglang.args import parse_args
mock_sglang_cli(model="Qwen/Qwen3-0.6B", custom_jinja_template=JINJA_TEMPLATE_PATH) mock_sglang_cli(model="Qwen/Qwen3-0.6B", custom_jinja_template=JINJA_TEMPLATE_PATH)
config = await parse_args(sys.argv[1:]) config = await parse_args(sys.argv[1:])
...@@ -69,8 +62,6 @@ async def test_custom_jinja_template_valid_path(mock_sglang_cli): ...@@ -69,8 +62,6 @@ async def test_custom_jinja_template_valid_path(mock_sglang_cli):
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_custom_jinja_template_env_var_expansion(monkeypatch, mock_sglang_cli): async def test_custom_jinja_template_env_var_expansion(monkeypatch, mock_sglang_cli):
"""Test that environment variables in paths are expanded by Python code.""" """Test that environment variables in paths are expanded by Python code."""
from dynamo.sglang.args import parse_args
jinja_dir = str(TEST_DIR / "serve" / "fixtures") jinja_dir = str(TEST_DIR / "serve" / "fixtures")
monkeypatch.setenv("JINJA_DIR", jinja_dir) monkeypatch.setenv("JINJA_DIR", jinja_dir)
......
...@@ -680,7 +680,6 @@ COPY --chmod=664 --chown=dynamo:0 ATTRIBUTION* LICENSE /workspace/ ...@@ -680,7 +680,6 @@ COPY --chmod=664 --chown=dynamo:0 ATTRIBUTION* LICENSE /workspace/
# Copy tests, benchmarks, deploy and components for CI with correct ownership # Copy tests, benchmarks, deploy and components for CI with correct ownership
# Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path> # Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path>
COPY --chmod=775 --chown=dynamo:0 pyproject.toml /workspace/
COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests
COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples
COPY --chmod=775 --chown=dynamo:0 benchmarks /workspace/benchmarks COPY --chmod=775 --chown=dynamo:0 benchmarks /workspace/benchmarks
......
...@@ -678,7 +678,6 @@ RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requi ...@@ -678,7 +678,6 @@ RUN --mount=type=bind,source=./container/deps/requirements.txt,target=/tmp/requi
# Copy tests, deploy and components for CI with correct ownership # Copy tests, deploy and components for CI with correct ownership
# Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path> # Pattern: COPY --chmod=775 <path>; chmod g+w <path> done later as root because COPY --chmod only affects <path>/*, not <path>
COPY --chmod=775 --chown=dynamo:0 pyproject.toml /workspace/
COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests COPY --chmod=775 --chown=dynamo:0 tests /workspace/tests
COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples COPY --chmod=775 --chown=dynamo:0 examples /workspace/examples
COPY --chmod=775 --chown=dynamo:0 deploy /workspace/deploy COPY --chmod=775 --chown=dynamo:0 deploy /workspace/deploy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment