Skip to content

[Bug] Fix 3 failing + 2 erroring tests in CI on main #175

@zhaochenyang20

Description

@zhaochenyang20

CI Run: https://github.com/sgl-project/sglang-omni/actions/runs/23229772248/job/67520568093
Branch: main (commit cd9aaf3)
Result: 3 failed, 2 errors, 27 passed, 2 skipped


Summary

The PR Test CI workflow (pytest tests/ -v) has 5 broken test cases on main, caused by two independent issues:

  1. Encoder cache (cache_key) is not working — 3 FAILED tests
  2. Missing preprocessor_config.json in CI model cache — 2 ERROR tests

Issue 1: Encoder cache tests failing (3 tests)

Failing tests

Test Expected forward_count Actual
test_cache_key.py::TestCacheHit::test_same_key_hits_cache 1 2
test_cache_key.py::TestCacheHit::test_multiple_hits 1 5
test_cache_key.py::TestCacheEviction::test_lru_eviction 3 (after hitting key-1 from cache) 4

Root cause

The encoder engine's result cache (use_cache=True) appears to never actually cache results. Every request with the same cache_key still triggers a model forward call, as if the cache lookup always misses.

Relevant code

  • Test: tests/test_cache_key.py
  • Engine factory: sglang_omni.engines.omni.create_encoder_engine
  • Likely bug location: the cache get/set logic in the encoder engine runtime

Issue 2: Video integration tests erroring at setup (2 tests)

Erroring tests

Test Error
test_video_integration.py::test_two_round_conversation ERROR at setup (server_process fixture)
test_video_integration.py::test_server_stability_after_request ERROR at setup (server_process fixture)

Root cause

Both tests share a server_process module-scoped fixture that launches sglang_omni.cli.cli serve --model-path Qwen/Qwen3-Omni-30B-A3B-Instruct. The server exits immediately with code 1 because:

  1. Qwen3OmniMoeProcessor.from_pretrained() fails with an IndexError inside transformers image_processing_base.py:354 — the HuggingFace cache snapshot is likely incomplete or corrupt.
  2. The fallback path _build_processor_local() then tries to open preprocessor_config.json directly from the model directory, which does not exist in the CI cache:
FileNotFoundError: [Errno 2] No such file or directory:
'/github/home/.cache/huggingface/hub/models--Qwen--Qwen3-Omni-30B-A3B-Instruct/
snapshots/26291f793822fb6be9555850f06dfe95f2d7e695/preprocessor_config.json'

Error traceback (abbreviated)

sglang_omni/models/qwen3_omni/components/preprocessor.py:108  # from_pretrained fails
  → preprocessor.py:116  # fallback to _build_processor_local
    → preprocessor.py:66  # calls _load_preprocessor_config
      → preprocessor.py:45  # FileNotFoundError on preprocessor_config.json

Relevant code

  • Test fixture: tests/test_model/test_video_integration.py::server_process
  • Preprocessor init: sglang_omni/models/qwen3_omni/components/preprocessor.py (lines 45, 66, 108, 116)

Possible fixes

  • Ensure the model cache on the CI runner includes preprocessor_config.json (re-download or update the cached snapshot).
  • Or: make the preprocessor more resilient when the file is missing (e.g., provide sensible defaults or download the missing config file on the fly).

Additional notes

  • There is also a warning about fishaudio_s2_pro failing to import AssistantStreamEvent from openai.types.beta.assistant_stream_event — this doesn't cause test failures currently but indicates a dependency version mismatch with the openai package.
  • The CI uses a pinned Docker image frankleeeee/sglang-omni:dev with Python 3.11.14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions