Skip to content

Commit

Permalink
actually let's not touch sd for now
Browse files Browse the repository at this point in the history
  • Loading branch information
renxida committed Nov 25, 2024
1 parent 022d845 commit 8298dda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_linux_x64_nogil-libshortfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ jobs:
- name: Run shortfin Python tests (full)
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
pytest -s --ignore=tests/examples/fastapi_test.py
pytest -s --ignore=tests/examples/fastapi_test.py --ignore=tests/apps/sd
# TODO: Enable further tests and switch to
# pytest -s
24 changes: 12 additions & 12 deletions shortfin/python/shortfin_apps/sd/_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

from shortfin.support.deps import ShortfinDepNotFoundError

shortfin_llm_deps = ["tokenizers", "dataclasses_json", "transformers"]
try:
import transformers
except ModuleNotFoundError as e:
raise ShortfinDepNotFoundError(__name__, "transformers") from e

for dep in deps:
try:
__import__(dep)
except ModuleNotFoundError as e:
if "pytest" in sys.modules:
import pytest
try:
import tokenizers
except ModuleNotFoundError as e:
raise ShortfinDepNotFoundError(__name__, "tokenizers") from e

pytest.skip(
f"Shortfin LLM dependency not available: {dep}", allow_module_level=True
)
else:
raise ShortfinDepNotFoundError(__name__, dep) from e
try:
import dataclasses_json
except ModuleNotFoundError as e:
raise ShortfinDepNotFoundError(__name__, "dataclasses-json") from e

0 comments on commit 8298dda

Please sign in to comment.