-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
365c91f
commit 0c8a784
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Offline usage / Python - Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- hub-offline* | ||
pull_request: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.9] | ||
os: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies for pytorch export | ||
run: | | ||
pip install .[tests,openvino] | ||
- name: Test with unittest | ||
run: | | ||
HF_HOME=/tmp/ huggingface-cli download hf-internal-testing/tiny-random-gpt2 | ||
HF_HOME=/tmp/ HF_HUB_OFFLINE=1 optimum-cli export openvino --model hf-internal-testing/tiny-random-gpt2 gpt2_openvino --task text-generation | ||
huggingface-cli download hf-internal-testing/tiny-random-gpt2 | ||
HF_HUB_OFFLINE=1 optimum-cli export openvino --model hf-internal-testing/tiny-random-gpt2 gpt2_openvino --task text-generation | ||
pytest tests/openvino/test_modeling.py -k "test_load_model_from_hub and not from_hub_openvino" -s -vvvvv | ||
HF_HUB_OFFLINE=1 pytest tests/openvinoruntime/test_modeling.py -k "test_load_model_from_hub and not from_hub_openvino" -s -vvvvv |