Download tests/conftest.py from khoicrtp/test_model: direct link, hf CLI and curl.
- Browser
- Download file 691 Bytes
-
https://huggingface.co/khoicrtp/test_model/resolve/main/tests/conftest.py
- Command line
-
hf download hf://khoicrtp/test_model/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/khoicrtp/test_model/resolve/main/tests/conftest.py
691 Bytes
| import sys | |
| from pathlib import Path | |
| import pytest | |
| wd = Path(__file__).parent.parent.absolute() | |
| def orig_llama(): | |
| sys.path.append(str(wd)) | |
| from scripts.download import download_original | |
| download_original(wd) | |
| import original_model | |
| return original_model | |
| def orig_llama_adapter(): | |
| sys.path.append(str(wd)) | |
| from scripts.download import download_original | |
| download_original(wd) | |
| import original_adapter | |
| return original_adapter | |
| def lit_llama(): | |
| # this adds support for running tests without the package installed | |
| sys.path.append(str(wd)) | |
| import lit_llama | |
| return lit_llama | |