File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Offline usage / Python - Test
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - hub-offline*
8
+ pull_request :
9
+ branches : [main]
10
+
11
+ concurrency :
12
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13
+ cancel-in-progress : true
14
+
15
+ jobs :
16
+ build :
17
+ strategy :
18
+ fail-fast : false
19
+ matrix :
20
+ python-version : [3.9]
21
+ os : [ubuntu-latest]
22
+
23
+ runs-on : ${{ matrix.os }}
24
+ steps :
25
+ - uses : actions/checkout@v3
26
+ - name : Setup Python ${{ matrix.python-version }}
27
+ uses : actions/setup-python@v3
28
+ with :
29
+ python-version : ${{ matrix.python-version }}
30
+ - name : Install dependencies for pytorch export
31
+ run : |
32
+ pip install .[tests,openvino]
33
+ - name : Test with unittest
34
+ run : |
35
+ HF_HOME=/tmp/ huggingface-cli download hf-internal-testing/tiny-random-gpt2
36
+ HF_HOME=/tmp/ HF_HUB_OFFLINE=1 optimum-cli export openvino --model hf-internal-testing/tiny-random-gpt2 gpt2_openvino --task text-generation
37
+ huggingface-cli download hf-internal-testing/tiny-random-gpt2
38
+ HF_HUB_OFFLINE=1 optimum-cli export openvino --model hf-internal-testing/tiny-random-gpt2 gpt2_openvino --task text-generation
39
+ pytest tests/openvino/test_modeling.py -k "test_load_model_from_hub and not from_hub_openvino" -s -vvvvv
40
+ HF_HUB_OFFLINE=1 pytest tests/openvinoruntime/test_modeling.py -k "test_load_model_from_hub and not from_hub_openvino" -s -vvvvv
You can’t perform that action at this time.
0 commit comments